In JavaScript, the mouseenter event fires when a pointing device moves so its hotspot enters the element (MDN). Paired with mouseleave, it acts much like CSS :hover. The event type is a MouseEvent.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Stay inside children. State stays hovered (no re-fire).
Leave.mouseleave resets to idle.
Use case. Tooltips, card previews, hover menus.
Compatibility
Browser Support
Element mouseenter is Baseline Widely available (MDN: since July 2015). Safe for hover-style UI in modern and older evergreen browsers.
✓ Baseline · Widely available
Element mouseenter
MouseEvent when the pointer enters an element — long-established across browsers.
99%Widely available
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
Android WebViewSupported · Modern WebView
Full support
mouseenterBaseline
Bottom line: Use mouseenter + mouseleave for simple hover on one element. Prefer mouseover when deep hierarchies make many enter events costly.
Frequently Asked Questions
It fires when a pointing device moves so its hotspot enters the element (MDN). Combined with mouseleave, it behaves a lot like CSS :hover for that element.
No. MDN marks Element mouseenter as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard.
A MouseEvent. Useful fields include clientX, clientY, relatedTarget, and modifier keys.
mouseenter does not bubble and is not sent again when the pointer moves between the element and its descendants. mouseover bubbles and fires when moving among descendants.
It follows the element’s position in the DOM tree. If a child is visually outside its parent, entering the child can still fire mouseenter on the parent (MDN).
In very deep hierarchies, listening for mouseenter on many ancestors can fire a large number of events. MDN notes that mouseover can be a better choice in those performance-sensitive cases.