Categories

'touchdrag' Special Event

Categories: Touch Events

.bind( 'touchdrag', ... )

Plugin: jQuery.event.special.touch

Description: Bind special event on touch drag.

  • .bind( 'touchdrag', ... )

    version added: 1.0

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

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

The recieved event object on touchdrag includes advanced properties:

  • 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 .bind() and .unbind() method references for a way to bind/unbind event handlers.