HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
jQuery Event Methods : Set the background color to gray, when the mouse pointer leaves a <p> element
The mouseleave event occurs when the mouse pointer leaves the selected element.
The mouseleave() method triggers the mouseleave event, or attaches a function to run when a mouseleave event occurs.
Trigger the mouseleave event for the selected elements:
Attach a function to the mouseleave event:
Parameter | Description |
---|---|
function | Optional. Specifies the function to run when the mouseleave event is triggered |