jQuery hover() method

Definition

Use the jQuery hover() method, to hover over a matched element and call two functions, one for mouseenter and another for mouseleave.

Syntax

The following is the syntax,

The following are the parameters,

  • enterFunction: Function to run when the mouseenter event occurs. This is a required parameter.
  • leaveFunction: Function to run when the mouseleave event occurs. This is an optional parameter.

Example

The following is the output,

Hover over the heading to change its color. The color will change to blue,

jQuery focusout() method
jQuery keydown() method
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue Reading