jQuery Mobile swipeleftEvent
Examples
Swipe the <p> element left horizontally and hide it:
$("p").on("swipeleft",function(){
$(this).hide();
});
$(this).hide();
});
Try it Yourself »
Definition and Usage
The swipeleft event is triggered when dragging horizontally to the left more than 30px (and vertically less than 75px) within one second.
Related events:
- swipe- Refers to the event triggered when dragging horizontally more than 30px or vertically less than 75px within one second.
- swiperight- Refers to the event triggered when dragging horizontally to the right more than 30px within one second.
Syntax
$("selector").on("swipeleft",function(event){...})
| Parameters | Description |
|---|---|
| function(event) | Required. Specifies the function to execute when the swipeleft event is triggered. This function has an optional event object, which can be any jQuery event property (e.g., event.target, event.type, etc.). For more information, please refer tojQuery Events Reference Manual 。 |

More Examples
Event Object
Use the event.target property to return the DOM element that triggered the swipeleft event.
Other Extensions
jQuery Mobile Events