1.0.0 • Published 7 years ago
pure-swipe-js v1.0.0
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;
1.0.0
7 years ago