jQuery mouseenter Event — Enter Without Child Bubbling
Beginner
5 min read
Updated: Nov 2026
3 examples
Mouse Events
Definition
mouseenter fires when the pointer enters the element it is bound to. Moving into a child does not fire it again (unlike mouseover). Bind with .on("mouseenter", handler) (jQuery 1.7+).
Syntax
Start with these common calls. Keep them short and readable.
jQuery
$("#outer").on("mouseenter", function () { ... })
$("#outer").trigger("mouseenter")
// Enter element → fires once
// Enter a child inside it → does NOT fire again
// Prefer on/trigger — not the deprecated .mouseenter()
Call
What it does
mouseenter
Learn the jQuery mouseenter event: bind with .on(\
Load jQuery before your script (CDN or local file), then wrap DOM work in $(function () { ... }) when needed.
Parameters
Parameter
Description
Step 1
Select the element(s): $("#outer"), $(".card"), etc.
Step 2
Bind: .on("mouseenter", function (event) { ... }).
Step 3
Pair with .on("mouseleave", …) for hover-style UI.
Return Value
Return Value
Description
jQuery object
Most setters and traversing helpers return the jQuery collection so you can chain more methods.
jQuery Examples
Example 1 — Bind a mouseenter Handler
Official style: .on("mouseenter", …) on a container.
jQuery
$("#outer").on("mouseenter", function () {
console.log("Handler for mouseenter called.");
});
Fire the same handlers with a click on another control.
jQuery
$("#outer").on("mouseenter", function () {
console.log("Handler for mouseenter called.");
});
$("#other").on("click", function () {
$("#outer").trigger("mouseenter");
});
Entering a child re-fires mouseover, not mouseenter.
jQuery
var enterCount = 0;
var overCount = 0;
$("#enterBox").on("mouseenter", function () {
enterCount += 1;
console.log("mouseenter:", enterCount);
});
$("#overBox").on("mouseover", function () {
overCount += 1;
console.log("mouseover:", overCount);
});
// Move into each box, then into its Inner child:
// mouseenter stays 1; mouseover increases again.
mouseover also fires when you enter the Inner child.
Choose mouseenter for stable hover on parents with children.
Frequently Asked Questions
mouseenter fires when the pointer enters the bound element. Unlike mouseover, moving into a child does not fire it again. Bind with .on("mouseenter", handler) (jQuery 1.7+). jQuery simulates the event across browsers.
Prefer .on("mouseenter", handler). The .mouseenter(handler) shorthand is deprecated since jQuery 3.3. To fire the event, use .trigger("mouseenter") instead of .mouseenter().
mouseover bubbles and also fires when the pointer moves from parent into a child. mouseenter does not — it fires once when entering the element it is bound to, not when entering descendants.
Use mouseleave for when the pointer leaves the element (same non-child-bubbling behavior). .hover(enterFn, leaveFn) is a convenience that wires both.
Call $(selector).trigger("mouseenter"). That runs bound handlers without needing a real pointer move.
No — that is the point versus mouseover. Handlers on an ancestor are not triggered by entering a descendant of the bound element.