Team:NYMU-Taipei/menu.js
From 2014.igem.org
(Difference between revisions)
m |
m |
||
Line 1: | Line 1: | ||
$( document ).ready(function() { | $( document ).ready(function() { | ||
- | $('#menu>ul>li') | + | $('#menu > ul > li') |
.on('mouseover', function(){ | .on('mouseover', function(){ | ||
clearTimeout($.data(this,'timer')); | clearTimeout($.data(this,'timer')); |
Revision as of 14:05, 2 June 2014
$( document ).ready(function() {
$('#menu > ul > li') .on('mouseover', function(){ clearTimeout($.data(this,'timer')); $('#menu>ul>li>ul',this).stop(true,true).slideDown(200); alert('over'); }) .on('mouseout', function(){ $.data(this,'timer', setTimeout($.proxy(function() { $('#menu>ul>li>ul',this).stop(true,true).slideUp(200); }, this), 100)); alert('out'); });
});