PageSourceSearch

https://www.bsmpg.com/Portals/52884/js/jqueryslidemenu.js

js bsmpg.com collected 2026-09-24 10:03:23 UTC 2,564 bytes, 51 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
7//Specify full URL to down and right arrow images (23 is padding-right to add to top level LIs with drop downs):
8//var arrowimages={down:['downarrowclass', 'img/down.gif', 23], right:['rightarrowclass', 'img/right.gif']} - this is needed only for arrows
9
10var jqueryslidemenu={
11
12animateduration: {over: 200, out: 100}, //duration of slide in/ out animation, in milliseconds
13
14buildmenu:function(menuid, arrowsvar){
15	jQuery(document).ready(function($){
16		var $mainmenu=$("#"+menuid+">ul")
17		var $headers=$mainmenu.find("ul").parent()
18		$headers.each(function(i){
19			var $curobj=$(this)
20			var $subul=$(this).find('ul:eq(0)')
21			this._dimensions={w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()}
22			this.istopheader=$curobj.parents("ul").length==1? true : false
23			$subul.css({top:this.istopheader? this._dimensions.h+"px" : 0})
24			//$curobj.children("a:eq(0)").css(this.istopheader? {paddingRight: arrowsvar.down[2]} : {}).append(
25				//'<img src="'+ (this.istopheader? arrowsvar.down[1] : arrowsvar.right[1])
26				//+'" class="' + (this.istopheader? arrowsvar.down[0] : arrowsvar.right[0])
27				//+ '" style="border:0;" />'
28			//)
29			$curobj.hover(
30				function(e){
31					var $targetul=$(this).children("ul:eq(0)")
32					this._offsets={left:$(this).offset().left, top:$(this).offset().top}
33					var menuleft=this.istopheader? 0 : this._dimensions.w
34					menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft
35					if ($targetul.queue().length<=1) //if 1 or less queued animations
36						$targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over)
37				},
38				function(e){
39					var $targetul=$(this).children("ul:eq(0)")
40					$targetul.slideUp(jqueryslidemenu.animateduration.out)
41				}
42			) //end hover
43		}) //end $headers.each()
44		$mainmenu.find("ul").css({display:'none', visibility:'visible'})
45	}) //end document.ready
46}
47}
48
49//build menu with ID="myslidemenu" on page:
50//jqueryslidemenu.buildmenu("myslidemenu", arrowimages) - older version with arrows
51jqueryslidemenu.buildmenu("myslidemenu")

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.