Categories

'touchdrag' Special Event

Categories: Touch Events

.on( 'touchdrag', ... )

Plugin: jQuery.event.special.touch

Description: Bind special event on touch drag.

  • .on( 'touchdrag', ... )

    version added: 1.0

This .on() implements a simple bind to the touchdrag interaction.

The touchdrag event starts with touchstart on each element in the set of matched elements, while the user moves the finger the touchdrag event fires.

The recieved event object on touchdrag 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.