
Swipe-it is a small, dependency-free JavaScript library which allows to detect and bind swipe events: swipe, swipeLeft, swipeRight, swipeUp, swipeDown. Mouse drag is supported as well.
How to use it:
Create an html element on which you’d like to detect the swipe events.
<div class="box"> Swipe-it </div>
Create a new SwipeIt object.
var mySwipeIt = new SwipeIt('.box');Attach swipe events to the ‘mySwipeIt’ and add your custom handlers.
mySwipeIt
.on('swipeLeft',function(e){
//your handler here
alert('mySwipeIt is on swipeLeft!');
})
.on('swipeRight',function(e){
//your handler here
alert('mySwipeIt is on swipeRight!');
});






