Team:NYMU-Taipei/menu.js
From 2014.igem.org
(Difference between revisions)
m (Created page with "$( document ).ready(function() { $('#menu>ul>li') .on('mouseover', function(){ clearTimeout($.data(this,'timer')); $('#menu>ul>li>ul',this).stop...") |
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); | ||
+ | alert('over'); | ||
}) | }) | ||
.on('mouseout', function(){ | .on('mouseout', function(){ | ||
Line 9: | Line 10: | ||
$('#menu>ul>li>ul',this).stop(true,true).slideUp(200); | $('#menu>ul>li>ul',this).stop(true,true).slideUp(200); | ||
}, this), 100)); | }, this), 100)); | ||
+ | alert('out'); | ||
}); | }); | ||
}); | }); |
Revision as of 14:01, 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'); });
});