快速移动光标时,jQuery,Mouseleave不会触发容器 [英] jQuery, Mouseleave not fired on container when moving cursor fast
问题描述
我有一点问题。
那么,jsfiddle上的代码本身就会说明问题,以便引发错误,将鼠标快速移动到红框上(一边或另一边)。
一个简单的解释:
我有一个项目列表,当我把它们悬停时,我在它们的位置上显示一个覆盖div,我将一个mouseenter绑定到列表项上,并在覆盖div上绑定一个mouseleave,但是如果移动光标加快,mouseleave永远不会被触发。
任何想法?谢谢!
http://jsfiddle.net/QH3LV/22 /
这是你正在寻找的。 p> 放置隐藏的 I've got a bit of a bug.
Well, the code on jsfiddle speaks for itself, to provoke the bug move your mouse quickly over the red box (to one side or the other). A quick explanation:
I have a list of items, when i hover them i show an overlay div on their positions, i bind an mouseenter on the list item, and an mouseleave on the overlay div, but if you move the cursor to fast, the mouseleave is never triggerd. Any ideas? Thanks! This is what you are looking for. There should be no problem in placing the hidden 这篇关于快速移动光标时,jQuery,Mouseleave不会触发容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
div $应该没有问题c $ c>里面
li
标记div
inside the li
tag