开发者

Mozilla Firefox: show/hide triggers a mouseover event?

Let's say you have a <div> element which is hidden.

There is a mouseover event attached to it and the mouse cursor is placed at the location where the <div> element will appear once it is visible.

How I开发者_如何学JAVA can prevent the mouseover event from firing when the <div> is made visible?


You can't. The event is fired when the mouse is over a new element in Gecko, whether due to the mouse moving or elements moving. This is quite purposeful; it makes things like CSS :hover work correctly when the mouse is not moving.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜