Search within TutorialsPark

jQuery Mobile : Touch Events


Learn how to use jQuery Mobile for Touch Events


jQuery Mobile: Touch Events

jQuery Mobile touch events are triggered when the user Interacts with the device by touching, tapping or swiping gestures on the screen.

Touches and gestures of various types can be recognised and accordingly response can be assigned by the user

Table: jQuery Mobile - jQuery Mobile Layout Grid

Touch Event Description
tap When the user Taps on the Element
taphold When the user taps and holds on to the element for approx 1 Sec.
swipe Swipe either in vertical direction for 20 or less pixels , or horizontally for 30 or more pixels
swipeleft Swipe in left direction for 30 or more pixels
swiperight Swipe in right direction for 30 or more pixels

All the above Events are binded to the elements using jQuery methods of either on, bind, live or delegate

jQuery Mobile Touch Events : Tap

The jQuery mobile touch event of Tap is triggered when the user tap on the Screen or the assigned Element.

Example: jQuery Mobile Touch Event - Tap

Give it a TRY! » Note: Users can set any function to be executed when the event is triggered


jQuery Mobile Touch Event : Taphold

jQuery Mobile Touch Event taphold is triggered when the user touches and holds onto an element for appox 1 sec or more.

Syntax: jQuery Mobile Touch Event Taphold

Give it a TRY! » Note: Users can set any function to be executed when the event is triggered


jQuery Mobile Touch Event : Swipe

jQuery Mobile Touch Event swipe is triggered when the user swipes on the screen for more than 30 pixels

Syntax: jQuery Mobile Creating Split List

Give it a TRY! » Note: Users can set any function to be executed when the event is triggered


jQuery Mobile Touch Event : Swipe Left

jQuery Mobile Touch Event swipeleft is triggered when the user swipes on the screen in left direction for more than 30 pixels

Syntax: jQuery Mobile Filtering List

Give it a TRY! » Note: Users can set any function to be executed when the event is triggered


jQuery Mobile Touch Event : Swipe Right

jQuery Mobile Touch Event swiperight is triggered when the user swipes on the screen in right direction for more than 30 pixels

Syntax: jQuery Mobile Touch Events

Give it a TRY! » Note: Users can set any function to be executed when the event is triggered