.mousemove() Event

Syntax

.mousemove()

Description

.mousemove() event is used to trigger an action when the mouse is moved over an element.
The mouse move event occurs when the pointing device is moved while it is over an element. This attribute may be used with most elements. In the below example, the coordinates of the specified div are found on mousemove event.

Example Code

Result:

Click anywhere on the coloured area!


Ask Questions

Ask Question