In JavaScript, the mouseover event fires when a pointing device moves the cursor onto an element or one of its child elements (MDN). It bubbles. The event type is a MouseEvent.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
One listener. Bubbling makes parent-level handlers work.
Filter target. Ignore events that are not on an LI.
React per child. Useful for menus, tables, and dynamic lists.
Pair with mouseout if you need leave cleanup for each item.
Compatibility
Browser Support
Elementmouseover is Baseline Widely available (MDN, since July 2015). It is a standard MouseEvent — not Deprecated, Experimental, or Non-standard.
✓ Baseline · Widely available
Element mouseover
Fires when the pointer enters an element or its children. Bubbles — unlike mouseenter.
99%Modern browser support
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
mouseoverExcellent
Bottom line: Safe everywhere students build today. Prefer mouseenter for simple hover; use mouseover for delegation and per-child enter.
Frequently Asked Questions
It fires when a pointing device moves the cursor onto an element or one of its child elements (MDN).
No. MDN marks Element mouseover as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard.
A MouseEvent (inherits from UIEvent and Event). Useful fields include relatedTarget, clientX, clientY, and target.
mouseover bubbles and also fires when moving onto child elements (or among child boundaries). mouseenter does not bubble and fires only when entering the element and its descendant tree as a whole (MDN).
For whole-component hover enter without descendant noise, MDN notes mouseenter/mouseleave are usually more sensible than mouseover/mouseout.
When you want bubbling/delegation, or when you care about entering individual children (for example highlighting each list item as the pointer moves over it).