Skip to content

rajinha92/swipejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swipe JS

A simple JS plugin for listening swipe events.

1- Installation

npm install pure-swipe-js

2 - Usage

Import the JS from wherever you put it

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

Then listen for events

    app.addEventListener('swipe.start', function() {
    });
    app.addEventListener('swipe.progress', function(event) {
    });
    app.addEventListener('swipe.cancel', function(event) {
    });
    app.addEventListener('swipe.end', function(event) { 
    });

3 - Configuration

You can override the SwipeJS configuration

SwipeJSConfig.sensitivityX = 200;
SwipeJSConfig.sensitivityY = 20;

Releases

No releases published

Packages

No packages published