Reputation: 940
I'm simply looking for a listener that will detect the swipe of a finger on a touch device.
For example;
if (swipe.direction == 'left' ) {
function();
}
Upvotes: 8
Views: 14840
Reputation: 984
A much nicer plugin for handling swipes ( if that's all you want ) is Touch Swipe.
I found the touchwipe to be pretty rubbish, and I always find jQueryMobile way to heavy when all you want is this functionality.
https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
Upvotes: 2
Reputation: 7783
With jQueryMobile you can use several events, such as swipe
, or even swipeleft
, swiperight
, tap
, etc.
http://jquerymobile.com/test/docs/api/events.html
Upvotes: 4
Reputation: 13461
You can use this jquery plugin
http://www.netcu.de/jquery-touchwipe-iphone-ipad-library
Upvotes: 4