Team:NYMU-Taipei/menu.js
From 2014.igem.org
(Difference between revisions)
m |
m |
||
Line 4: | Line 4: | ||
clearTimeout($.data(this,'timer')); | clearTimeout($.data(this,'timer')); | ||
$('#menu>ul>li>ul',this).stop(true,true).slideDown(200); | $('#menu>ul>li>ul',this).stop(true,true).slideDown(200); | ||
- | |||
}) | }) | ||
.on('mouseout', function(){ | .on('mouseout', function(){ | ||
Line 10: | Line 9: | ||
$('#menu>ul>li>ul',this).stop(true,true).slideUp(200); | $('#menu>ul>li>ul',this).stop(true,true).slideUp(200); | ||
}, this), 100)); | }, this), 100)); | ||
- | |||
}); | }); | ||
}); | }); |
Revision as of 14:32, 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); }) .on('mouseout', function(){ $.data(this,'timer', setTimeout($.proxy(function() { $('#menu>ul>li>ul',this).stop(true,true).slideUp(200); }, this), 100)); });
});