4
我想通過使用.delay和.queue來防止懸停時的工具提示意外激活。jquery .hover和.delay
它的工作原理,但我不知道如何停止執行,當你鼠標移出隊列(離開該區域)
$('.has_tooltip').hover(
function(){
$(this).toggleClass('highlight').delay(400).queue(function(next){
$(this).children('.tooltip').show(); next();
});
},
function(){
$(this).toggleClass('highlight').children('.tooltip').fadeOut(200)
}
);
我認爲你正在尋找[.clearqueue](http://api.jquery.com/clearQueue/) – 2011-01-12 07:16:04