Mouseenter
For issues relating to setting up, subscribing to, or handling mouseenter events.
Mouseover
A mouseover is an event that occurs on an element when the user moves the cursor over that element
Time better use
Example |
---|
"The mouseenter event is usually a better choice than mouseover" from question JQuery - how to use the hover() event on a list of DIVs? |
"Use mouseenter not mouseover;unlike the mouseenter event the mouseover event triggers if a mouse pointer enters any child elements as well as the selected element" from question Add / remove a class, a time interval for all child elements when you hover on parent |
"Also note that the mouseover event will be triggered every time the user move the mouse over the button;mouseenter is more apropriate in this case" from question Anime-js hover animation flashing when moving too fast |
Others
Example |
---|
In this particular case it makes little difference but in other situations mouseover can lead to unexpected outcomes whereas mouseenter is somewhat more predictable from question How can I add/remove class on a second element with vanilla JS? |