Detect swipes in 164 bytes (gzipped).
###Usage:
-
Include
swipes.js
-bower install simple-swipes
or download it -
Bind to the
swipe
event$element.on('swipe', function (event) { switch (event.originalEvent.detail.direction) { case 'UP': ... case 'RIGHT': ... case 'DOWN': ... case 'LEFT': ... } });
-
Note: jQuery isn't required, just used for demonstration purposes
###Demo:
###Author:
- Ryan Walters
- http://ryanwalters.co