pure-swipe-js

1.0.0 • Public • Published

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;

Readme

Keywords

none

Package Sidebar

Install

npm i pure-swipe-js

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • masterdev