.hover() Event

Syntax

hover( handlerIn(eventObject), handlerOut(eventObject) )

Description

.hover() event is used to combine the actions of both mouseenter and mouseleave. handlerIn(eventObject) is a function to be executed when the mouse pointer enters the element. handlerOut(eventObject) is a function to be executed when the mouse pointer leaves the element. In the below example, the background color of the text is changed using this function.

Example Code

Result:

Hover the mouse pointer over me.


Ask Questions

Ask Question