jQuery Mousemove Event

The mousemove event can fire repeatedly while the pointer moves over an element. Keep the handler lightweight because it may run many times in a short period.

Syntax Top ↑

$( selector ).on( "mousemove", function (event) {
    // Pointer moved over the element.
});

Show Mouse-Movement Status Top ↑

$( function () {
    $( "#d1" ).on( "mousemove", function () {
        $( "#t1" ).text( "You moved the mouse inside the box" );
    });

    $( "#d1" ).on( "mouseout", function () {
        $( "#t1" ).text( "You moved the mouse out" );
    });
});

Open the mousemove demo →

To read coordinates during mouse interaction, see event.pageX and event.pageY.

Mouse Events with jQuery






plus2net.com






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer