jQuery plugin to assign swipe event listener.
$(element).swipeListener(option);
Example:
$("#target").swipeListener({
swipeLeft: function() { alert("you just swiped left."); }
});
- duration : the time from touchstart to touchend must be in this period.
- minX : the position moved more than this value to deem swipe right or left
- minY : the position must be moved more than this value to deem swipe up or down
- swipeUp : callback function that is invoked when swipe up event happens
- swipeDown : callback function for swipe down
- swipeLeft : callback function for swipe left
- swipeRight : callback function for swipe right