swi

0.1.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i swi

Weekly Downloads

4

Version

0.1.1

License

MIT

Last publish

Collaborators

  • ipavlov