我有其中当鼠标悬停在其上的小销的时间轴,向上或向下滑动,然后显示字幕不被触发。当鼠标离开时,标题应该消失并且引脚向后移动。这是有效的,但是对于我使用的代码,如果鼠标移动太快,它不会检测到鼠标离开。我怎样才能解决这个问题?jQuery的鼠标离开功能时鼠标移动很快
P.S,我使用鼠标进入/离开的唯一原因是因为我觉得我需要使用活的()为我的元素在文档加载后动态添加。
$('#about-me .progress-bar .progress .notes li.personal').live('mouseenter',function(){
$(this).animate({
top:25
}, 200, function(){
$(this).find('.caption').stop(true, true).fadeIn(200);
});
}).live('mouseleave',function(){
$(this).find('.caption').stop(true, true).delay(200).fadeOut(200,function(){
$(this).parents('li').animate({
top:30
},200);
});
});
当你说它没有检测到mouseleave,如果你用alert('test')替换mouseleave函数,这是不是会触发? – lnrbob 2011-05-26 20:22:30
哦,它确实:( 的标题就是不淡出,销不动画>。< – Henryz 2011-05-26 20:26:33
知道为什么这可能是发生? – Henryz 2011-05-26 20:27:13