Mouseenter
For issues relating to setting up, subscribing to, or handling mouseenter events.
Mousemove
For issues relating to setting up, subscribing to, or handling mousemove events.
Others
Example |
---|
Mousemove is more intrusive than mouseenter but it tracks your mouse position all the time so that the tooltip moves accordingly from question Why is the tooltip showing at the top left, instead of where the pointer is? |
You could even trigger the mouseenter event on mousemove as long as you include some kind of flag state-check to ensure your mouseenter code doesn t get executed repeatedly on mousemove;jquery s mousemove method is a nice solution here as it does get triggered when the mouse is rolled into an element as you scroll even while the mouse has remained static from question Mouseover/mouseenter not fired when scrolling |
Problably the problem is that mousemove event may fire earlier than mouseenter in some cases from question Unable to get property 'hasClass' of undefined or null reference |