'mousedrag' Special Event
Categories: Mouse Events
.on( 'mousedrag', ... )
Plugin: jQuery.event.special.mouse
Description: Bind special event on mouse drag.
-
.on( 'mousedrag', ... )
version added: 1.0
This .on()
implements a simple bind to the mousedrag
interaction.
The mousedrag
event starts with mousedown
on each element in the set of matched elements, when the user moves
the mouse now while he is holding the mousedown
the mousedrag
event fires.
The recieved event object on mousedrag
includes advanced properties:
- event.dragState A value which represents the current drag status (start / while / end).
- event.dragDeltaT Milliseconds between current and previous drag event state.
- event.dragDelta A float value which represents the diagonal pixel distance between the last and current position.
- event.dragDeltaX A float value which represents the pixel distance between the last and current position on the x-axis.
- event.dragDeltaY A float value which represents the pixel distance between the last and current position on the y-axis.
See the .on() and .off() method references for a way to bind/unbind event handlers.