In JavaScript, the mouseout event fires when a pointing device moves so the cursor is no longer contained within the element or one of its children (MDN). It also fires when the cursor enters a child that covers the parent. The event type is a MouseEvent.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Delegate on the list. One listener covers all items.
Find the item.closest("li") maps the target to a row.
Ignore non-items. Guard when the event is not from an li.
Use case. Per-item exit feedback (MDN list demo idea).
Compatibility
Browser Support
Element mouseout is Baseline Widely available (MDN: since July 2015). Safe for bubbling leave/delegation patterns in modern and older evergreen browsers.
✓ Baseline · Widely available
Element mouseout
MouseEvent when the pointer leaves an element or enters a child — 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
mouseoutBaseline
Bottom line: Use mouseout for bubbling/child-aware leaves. Prefer mouseleave for whole-component hover exit without descendant noise.
Frequently Asked Questions
It fires when a pointing device moves so the cursor is no longer contained within the element or one of its children (MDN). It also fires when the cursor enters a child that covers the parent.
No. MDN marks Element mouseout as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard.
A MouseEvent. Useful fields include relatedTarget, clientX, clientY, and target.
mouseout bubbles and also fires when moving from a parent into a child (or among child boundaries). mouseleave does not bubble and fires only when leaving the element and all descendants.
For whole-component hover exit without descendant noise, MDN notes mouseenter/mouseleave are usually more sensible than mouseover/mouseout.
When you want bubbling/delegation, or when you care about leaving individual children (for example reacting as the pointer exits each list item).