element, set the background color to gray: ```javascript $("p").mouseout(function(){ $("p").css("background-color","gray"); }); [Try it Β»](#) * * * ## Definition and Usage The mouseout event occurs when the mouse pointer leaves the selected element. The mouseout() method triggers the mouseout event, or adds a function to run when a mouseout event occurs. **Note:** Unlike the (#) event, the mouseout event is triggered when the mouse pointer leaves the selected element or any of its child elements. The mouseleave event is only triggered when the mouse pointer leaves the selected element. See the demonstration example at the bottom of the page. **Tip:** This event is often used together with the (#) event. * * * ## Syntax Trigger the mouseout event for the selected element: ```javascript $(selector).mouseout() (#) Add a function to the mouseout event: ```javascript $(selector).mouseout(function) (#) | Parameter | Description | | :--- | :--- | | _function_ | Optional. Specifies the function to run when the mouseout event is triggered. | * * *  ## More Examples [Difference between mouseout() and mouseleave()](#) Demonstrate the difference between mouseout() and mouseleave(). * * jQuery Event Methods](#)
Event Mouseout
# jQuery mouseout() Method
[ jQuery Event Methods](#)
## Example
When the mouse pointer leaves the
YouTip