jQuery之mouseover,mouseover,mouseout,mouseleave

[size=medium][b]Jquery mouseenter() vs mouseover()[/b][/size]

[b]问题:[/b]

在使用 $.slideDown() , $.slideUp() 时,
如果是用 mouseover() 事件去触发该效果,则会出现效果重叠现象。
就是 $.slideDown() , $.slideUp() 会被触发多次。

这不是我们想要的。
使用 mouseenter() 代替。


[b]参考:[/b]

You see the behavior when your target element contains child elements:

http://jsfiddle.net/ZCWvJ/7/

Each time your mouse enters or leaves a child element, mouseover is triggered, but not mouseenter.


--------------------------------------------------------------------------------

This is one of the best examples I have found of:

- mouseenter
- mouseover
- mouseout
- mouseleave

http://bl.ocks.org/mbostock/5247027


--------------------------------------------------------------------------------


-

你可能感兴趣的:(css,javaScript)