PageSourceSearch

https://www.bluemacaws.org/js/jqueryslidemenu.js

js bluemacaws.org collected 2026-10-02 12:26:05 UTC 2,404 bytes, 50 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):
8var arrowimages={down:['downarrowclass', 'images/down.gif', 38], right:['rightarrowclass', 'images/right.gif']}
9
10var jqueryslidemenu={
11
12animateduration: {over: 400, out: 400}, //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:
50jqueryslidemenu.buildmenu("myslidemenu", arrowimages)

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.