Javatpoint Logo
Javatpoint Logo

jQuery mouseout()

The mouseout event is occurred when you remove your mouse cursor from the selected element .Once the mouseout event is occurred, it executes the mouseout() method or attach a function to run.

This event is generally used with mouseover () event.

Note: Most of the people are confused between mouseout and mouseleave.

Difference between mouseleave and mouseout

The mouseleave event is only triggered if the mouse pointer leaves the selected element whereas the mouseout event triggers if the mouse cursor leaves any child elements as well as the selected element.

Syntax:

It triggers the mouseout event for selected elements.

It adds a function to the mouseout event.

Parameters of jQuery mouseout() event

Parameter Description
Function It is an optional parameter. It executes itself when the mouseout event is triggered.

Example of jQuery mouseout() event

Let's take an example to demonstrate jQuery mouseout() event.

Test it Now

Output:

Move your cursor over this paragraph.


jQuery mouseout() event example 2

Let's see another example of jQuery mouseout() event.

Test it Now

Output:

move your mouse
Next TopicjQuery load()




Please Share

facebook twitter google plus pinterest tumbler

Learn Latest Tutorials