Skip to content

tehvgg/swipe-util

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

swipe-util

Swipe event utility for mobile devices.

Try it out

http://tehvgg.github.io/swipe-util/

How to use it?

Include the script in your head.

<script src="swipe.js"></script>

Instantiate the class.

var el = document.body;
var swipe = new Swipe(el, { doPreventScroll: true });

Apply your event listeners.

el.addEventListener(swipe.up, handleSwipe);
el.addEventListener(swipe.down, handleSwipe);
el.addEventListener(swipe.left, handleSwipe);
el.addEventListener(swipe.right, handleSwipe);

About

A custom swipe event utility for mobile devices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published