jQuery mouseenter () method
Examples
When the mouse pointer enters the <p> element, set the background color to yellow:
$("p").css("background-color","yellow");
});
try it"
Definition and Usage
When the mouse pointer across the (enter) when the selected elements, mouseenter event occurs.
mouseenter () method triggers mouseenter event or add a function to run when the event occurs mouseenter.
Note: the mouseover event different, mouseenter event only when the mouse pointer enters the selected element is triggered, mouseover event will be triggered when the mouse pointer enters any of its child elements.See the bottom of the page presentation instance.
Note: This event is usually associated with mouseleave use incident.
grammar
Trigger the selected element mouseenter events:
Adding Functions to mouseenter event:
参数 | 描述 |
---|---|
function | 可选。规定 mouseenter 事件触发时运行的函数。 |
More examples
Different mouseenter () and mouseover () between
Different Demo mouseenter () and mouseover () between.