Gestures

Contact Us or call 1-877-932-8228
Gestures

Gestures

Like all JavaScript frameworks, jQuery Mobile offers support for event handling - convenient ways to respond programmatically to user interaction with our pages. Usefully, this includes touch events - responding to finger taps and swipes to change pages, open dialogs, etc. Here are the touch events, from the jQuery Mobile docs:

jQuery Mobile Touch Events
Event Details
tap Triggers after a quick, complete touch event
taphold Triggers after a held complete touch event
swipe Triggered when a horizontal drag of 30px or more (and less than 75px vertically) occurs within 1 second duration
swipeleft Triggered when a swipe event occurs moving in the left direction
swiperight Triggered when a swipe event occurs moving in the right direction

Let's take a look at an example.

Next