Template:Team:Amsterdam/ernst/scripts
From 2012.igem.org
(Difference between revisions)
Line 52: | Line 52: | ||
} | } | ||
- | function submenu3(){ | + | function submenu3() { |
+ | $(" #submenu ul ul ").css({display: "none", height:'auto'}); // Opera Fix | ||
- | + | var timer; | |
- | + | $(" #submenu ul li ").hover(function() { | |
- | + | if(timer) { | |
- | $(" #submenu ul li").hover(function(){ | + | clearTimeout(timer); |
- | if( | + | timer = null; |
- | + | ||
- | + | ||
} | } | ||
- | + | timer = setTimeout(function() { | |
- | + | $(this).find('ul:first').animate({display:'block', height:'show'},{queue:true, duration:400}); | |
- | }},function(){ | + | }, 500); |
- | + | },function(){ | |
- | + | $(this).find('ul:first').animate({height:'hide', display:'none'},{queue:true, duration:400}); | |
- | } | + | }); |
+ | }; | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
//submenu(); | //submenu(); | ||
- | submenu2(); | + | //submenu2(); |
- | + | submenu3(); | |
}); | }); | ||
Revision as of 10:39, 11 September 2012