The jQuery hover() method executes two functions when you roam the mouse pointer over the selected element. The hover() method triggers both the mouseenter and mouseleave events.
Note: If you specify only one function then it will be run for both the mouseenter and mouseleave event.
Parameters of jQuery hover() event
jQuery hover() example
Let's take an example to see the hover () effect. In this example, when you hover your mouse pointer over the selected element the the background color of that selected element will be changed.Test it Now
Hover your mouse pointer on me!
Note: In the above example, the background color of the selected element is violet for mouseenter event and green for mouseleave event.
jQuery hover() example 2
Let's see another example of hover() event with the combination of fadeIn and fadeOut effects.Test it Now