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', '/tc_skin_red_2col_rightmenu/img/down.gif', 23], right:['rightarrowclass', '/tc_skin_red_2col_rightmenu/img/right.gif']}; 9 10var jqueryslidemenu={ 11 12animateduration: {over: 400, out: 200}, //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 var timeoutId = 0; 30 $curobj.hover( 31 function(e){ 32 var activeLi = this; 33 var activeLiJq = $(this); 34 timeoutId = window.setTimeout(function(){ 35 var $targetul=activeLiJq.children("ul:eq(0)"); 36 activeLi._offsets={left:activeLiJq.offset().left, top:activeLiJq.offset().top}; 37 var menuleft=activeLi.istopheader? 0 : activeLi._dimensions.w; 38 menuleft=(activeLi._offsets.left+menuleft+activeLi._dimensions.subulw>$(window).width())? (activeLi.istopheader? -activeLi._dimensions.subulw+activeLi._dimensions.w : -activeLi._dimensions.w) : menuleft; 39 if ($targetul.queue().length<=1) //if 1 or less queued animations 40 $targetul.css({left:menuleft+"px", width:activeLi._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over); 41 }, 300); 42 }, 43 function(e){ 44 window.clearTimeout(timeoutId); 45 var $targetul=$(this).children("ul:eq(0)"); 46 $targetul.slideUp(jqueryslidemenu.animateduration.out); 47 } 48 ); //end hover 49 }); //end $headers.each() 50 $mainmenu.find("ul").css({display:'none', visibility:'visible'}); 51 }); //end document.ready 52} 53}; 54 55//build menu with ID="myslidemenu" on page: 56jqueryslidemenu.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.