PageSourceSearch

https://www.takesontech.com/wp-content/themes/Advanced-Newspaper/includes/js/jqueryslidemenu.js?ver=7.1.2

js takesontech.com collected 2026-10-02 06:37:02 UTC 2,778 bytes, 66 lines download raw bytes

1                                                                                                                                                                                                                                                                                                                                                                                                /*********************
2//* jQuery Multi Level CSS Menu #2- By Dynamic Drive: http://www.dynamicdrive.com/
3//* Last update: Nov 7th, 08': Limit # of queued animations to minmize animation stuttering
4//* Menu avaiable at DD CSS Library: http://www.dynamicdrive.com/style/
5*********************/
6
7var jqueryslidemenu={
8
9animateduration: {over: 200, out: 100}, //duration of slide in/ out animation, in milliseconds
10
11buildmenu:function(menuid){
12	jQuery(document).ready(function($){
13		var $mainmenu=$("#"+menuid+">ul")
14		$mainmenu.find("a").attr( 'title', '');
15		var $headers=$mainmenu.find("ul").parent()
16		$headers.each(function(i){
17			var $curobj=$(this)
18			var $subul=$(this).find('ul:eq(0)')
19			this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
20			this.istopheader=$curobj.parents("ul").length==1? true : false
21			$subul.css({top:this.istopheader? this._dimensions.h+0+"px" : 0})
22			
23			$curobj.mouseover(
24				function(e){
25					var $parent = $(this);
26					$parent.addClass("select");
27				}
28			)
29			$curobj.mouseout(
30				function(e){
31					var $parent = $(this);
32					$parent.removeClass("select");
33				}
34			)
35			
36			$curobj.hover(
37				function(e){
38					var $targetul=$(this).children("ul:eq(0)")
39					this._offsets={left:$(this).offset().left, top:$(this).offset().top}
40					var menuleft=this.istopheader? 0 : this._dimensions.w
41					menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft
42					
43					if ($targetul.queue().length<=1) //if 1 or less queued animations
44						$targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over)
45				},
46				function(e){
47					var $targetul=$(this).children("ul:eq(0)")
48					$targetul.slideUp(jqueryslidemenu.animateduration.out)
49				}
50			) //end hover
51		}) //end $headers.each()
52		$mainmenu.find("ul").css({display:'none', visibility:'visible'})
53	}) //end document.ready
54}
55}
56
57//build menu with ID="mainnav" on page:
58jqueryslidemenu.buildmenu("navcats");
59
60//build menu with ID="mainnav" on page:
61var jqueryslidesubmenu = jqueryslidemenu;
62jqueryslidesubmenu.buildmenu("navpages");
63
64//build menu with ID="mainnav" on page:
65var jqueryslidesubsubmenu = jqueryslidemenu;
66jqueryslidesubsubmenu.buildmenu("masthead");

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.