jQuery mouseleave | How to use mouseleave() event method in jQuery

jQuery mouseleave() method

The mouseleave event occurs when mouse leaves, the pointer of mouse, the selected element. For example a paragraph, div. The mouseleave() method is used to perform certain action as mouseleave event takes place.

mouseleave is generally used with mouseenter event.

Syntax

$(selector). mouseleave(function)

Where function is optional. It runs as  double click event occurs.

e.g.

$(“p”). mouseleave(function)

$(“div”). mouseleave(function)

$(“button”). mouseleave(function)

Below is running examples of mouseleave() method with <p> HTML element.

Experience this example online


Also see jQuery click

Was this article helpful?

Related Articles

Leave A Comment?