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