As JQuery document says, I have converted many lines mouseover to mouseenter because it does not fire more than once.
http://api.jquery.com/mouseover/
mouseover
fires when the pointer moves into the child element as well
mouseenter
fires only when the pointer moves into the bound element.
Even hover
event works as mouseenter and mouseleave, not as mouseover and mouseout.
It makes me wonder why there is mouseover
event if mouseenter
can do it all.
For me, mouseover
gets fired unpredictably when you move mouse around on an element. It seems really dependent on the depth of child elements.
Is there a good use-case of mouseover
and mouseout
, which needs to fire multiple times?