0.1.1 • Published 7 years ago

swi v0.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

Install

npm install swi --save

Include

<script src='node_modules/swi/build/swi.js' type='text/javascript'></script>

...or use ES6 import

Use

swi({
  // element to attach swipe to, document by default
  element: document.getElementById('my-container'),
  left:  function () { console.log('Left swipe!');  }, // optional
  right: function () { console.log('Right swipe!'); }, // optional
  up:    function () { console.log('Up swipe!');    }, // optional
  down:  function () { console.log('Down swipe!');  }  // optional
});

Try it out

See the Swi implementation at Fustr.com