How should I create a custom page transition which listens to tap and swipe/drag even?.Suppose, if the page is dragged right/left (while still holding), then drag/slide the page to the value of swipe/threshold. And when the tap is released, if value is equal to or greater than the center of the page or maximum threshold, slide to the next page (link), or else slide back to its original position. Example. I would like to apply it in my jquery mobile app. An example demo would be great. Thank you.
Use a JavaScript library, such as HammerJS for easy touch gesture handling. Swipe is probably what you are looking for.
Also TouchSwipe jquery plugin is commendable, because it's easy to implement and provides swipe, pinch, touch and threshold events and triggers: https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With