jQuery mouseover () method
Examples
When the mouse pointer is <p> element at the top, set the background color to yellow:
$("p").css("background-color","yellow");
});
try it"
Definition and Usage
When the mouse pointer is located at the top of the element, mouseover event occurs.
mouseover () method triggers the mouseover event or add a function to run when the event mouseover event.
Note: Unlike mouseenter different events, mouseover event when the mouse pointer enters the selected element or any child elements will be triggered, mouseenter event only when the mouse pointer enters the selected element is triggered.See the bottom of the page presentation instance.
Note: This event is usually associated with mouseout use incident.
grammar
Trigger the selected element mouseover events:
Add the function to the mouseover event:
parameter | description |
---|---|
function | Optional. Mouseover function run when a predetermined trigger event. |
More examples
Different mouseover () and mouseenter () between
Different Demo mouseover () and mouseenter () between.