Skip to content

Latest commit

 

History

History
32 lines (30 loc) · 902 Bytes

README.md

File metadata and controls

32 lines (30 loc) · 902 Bytes

touch-libs

some light & tiny touch scripts with no dependancy

use like this:

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');
    });

preview