1/*jQuery menu 2Example: 3$(document).ready(function(){ 4 $('#jmenu').jmenu({animation:'fade',duration:100}); 5}); 6(c) 2010 Sawanna Team (http://sawanna.org)*/ 7var jmenu={ 8 effect: 'show', /* default animation effect */ 9 duration: 1, /* default duration */ 10 set: function (settings){ 11 try{ 12 if (settings.animation == 'show') { this.effect='show'; } 13 if (settings.animation == 'slide') { this.effect='slide'; } 14 if (settings.animation == 'fade') { this.effect='fade'; } 15 } catch (e) {} 16 try{ 17 this.duration=settings.duration; 18 } catch (e) {} 19 }, 20 fix_pos:function(elem){ 21 if ($(elem).parent('ul').parent('li').length){ 22 $(elem).children('ul').eq(0).css({marginTop:-$(elem).height(),marginLeft:$(elem).width()}); 23 } else{ 24 $(elem).children('ul').eq(0).css({'top':$(elem).offset().top+$(elem).height(),'left':$(elem).offset().left}); 25 } 26 }, 27 show:function(elem){ 28 if (this.effect=='fade') { $(elem).children('ul').eq(0).stop(1,1).fadeIn(this.duration); } 29 else if (this.effect=='slide') {$(elem).children('ul').eq(0).stop(1,1).slideDown(this.duration); } 30 else if (this.effect=='show') { $(elem).children('ul').eq(0).stop(1,1).show(this.duration); } 31 }, 32 hide: function(elem){ 33 $(elem).children('ul').eq(0).stop(1,1).fadeOut(1); 34 } 35} 36jQuery.fn.jmenu=function(settings){ 37jmenu.set(settings); 38$(this).find('li').each(function(){ 39 $(this).hover( 40 function(){ 41 jmenu.fix_pos(this); 42 jmenu.show(this); 43 }, 44 function() { 45 jmenu.hide(this); 46 } 47 ); 48 }); 49}
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.