some light & tiny touch scripts with no dependancy
var myTouch = new touch('.page');
myTouch.on('start', function (e) {
console.log('start', e);
});
myTouch.on('touch-move', function (distX, distY) {
console.log(distX, distY);
});
myTouch.on('throttle-move', function (e) {
console.log('throttle-move', e);
});
myTouch.on('tap', function (e) {
console.log('tap', e);
});
myTouch.on('swipe', function () {
console.log('swipe');
});
myTouch.on('swipe-left', function () {
console.log('swipeLeft');
});
myTouch.on('swipe-right', function () {
console.log('swipeRight');
});
- page link click here