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