jQuery Mobile swiperight Event | Tutorial
Tutorial -- Learning is not just about technology, but also about dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
jQuery Mobile Tutorial
jQuery Mobile Tutorial jQuery Mobile Introduction jQuery Mobile Installation jQuery Mobile Pages jQuery Mobile Transitions jQuery Mobile Buttons jQuery Mobile Button Icons jQuery Mobile Popups jQuery Mobile Toolbars jQuery Mobile Navigation Bars jQuery Mobile Panels jQuery Mobile Collapsibles jQuery Mobile Tables jQuery Mobile Grids
jQuery Mobile Lists
jQuery Mobile List Views jQuery Mobile List Content jQuery Mobile Filters
jQuery Mobile Forms
jQuery Mobile Form Basics jQuery Mobile Form Inputs jQuery Mobile Form Select jQuery Mobile Form Sliders
jQuery Mobile Themes
jQuery Mobile Events
jQuery Mobile Events jQuery Mobile Touch Events jQuery Mobile Scroll Events jQuery Mobile Orientation Change Events jQuery Mobile Examples jQuery Mobile Data Attributes jQuery Mobile Icons jQuery Mobile Events jQuery Mobile Page Events jQuery Mobile CSS Classes
Example
Hide the element <p> by swiping horizontally to the right:
$("p").on("swiperight",function(){
$(this).hide();
});
Definition and Usage
The swiperight event is triggered when a horizontal swipe to the right of more than 30px (and vertical swipe less than 75px) occurs within one second.
Related Events:
- swipe - Triggered when a horizontal swipe of more than 30px or a vertical swipe of less than 75px occurs within one second.
- swipeleft - Triggered when a horizontal swipe to the left of more than 30px occurs within one second.
Syntax
$("_selector_").on("swiperight",function(event){...})
| Parameter | Description |
|---|---|
| function(event) | Required. Specifies the function to run when the swiperight 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 to the jQuery Event Reference. |
More Examples
Use the event.target property to return the DOM element that triggered the swiperight event.
YouTip