jQuery Mobile's swipe functionality is awesome. Unfortunately you have to load in jQuery Mobile's entire script to use it. This plugin extracts the exact swipe logic from jQuery Mobile and turns it into a simple to use plugin. So if catching left and right swipe events is all you need, this plugin is for you.
// listen to both left and right signals // the String "left" or "right" will be // passed as an argument to the callback $(element).touchSwipe(callback); // listen for only the left swipe event $(element).touchSwipeLeft(callback); // listen for only the right swipe event $(element).touchSwipeRight(callback); // optional second argument will invoke // event.stopImmediatePropagation(); // available for all three methods above $(element).touchSwipe(callback, true); // unbind both left and right swipe events $(element).unbindSwipe(); // unbind only left swipe event $(element).unbindSwipeLeft(); // unbind only right swipe event $(element).unbindSwipeRight(); // example callback function callback(direction) { console.log(direction); }