Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior. It is intended to be used in mobile websites, mobile web apps, and mobile native/hybrid apps. Swiper is not compatible with all platforms, it is a modern touch slider which is focused only on modern apps/platforms to bring the best experience and simplicity. Swiper, along with other great components, is a part of Framework7 - a fully-featured framework for building iOS & Android apps. Swiper is also a default slider component in the Ionic Framework. jQuery Mobile swipe event is fired when we swipe in the element area. We can use this event for different purposes. Syntax: jQuery( ".selector" ).on( "swipe", function( event ) { } ) Approach: First, add jQuery Mobile scripts needed for your project.
Example 1: HTML
This demo shows how you can use the swipe event to navigate between pages. We are using single HTML files for each page. Here you can see the JavaScript and CSS source. On each of the demo pages you can see the page markup as well. Open swipe page demo Description: Triggered when a horizontal drag of 30px or more (and less than 30px vertically) occurs within 1 second duration.
Triggered when a horizontal drag of 30px or more (and less than 30px vertically) occurs within 1 second duration but these can be configured:
The swipe event can also be extend to add your own logic or functionality. The following methods can be extended:
|