jQuery Mobile swipe
Event
Example
Hide the element <p> by swiping horizontally on it:
Definition and Usage
The swipe event is triggered when a horizontal drag of 30px or more is detected (vertical drag less than 75px).
Tip: You can swipe quickly in both left and right directions.
Related Events:
swipeleft - Triggered when the user swipes over the element more than 30px from the left.
swiperight - Triggered when the user swipes over the element more than 30px from the right.
Syntax
Parameter | Description |
---|---|
function(event) | Required. Specifies the function to run when the swipe event is triggered. <br> <br>The function has an optional event object, which can be any jQuery event property (e.g., event.target, event.type, etc.). For more information, refer to the jQuery Event Reference |