1.0.0 • Published 5 years ago
touchevent.js v1.0.0
touchevent.js
TouchEvent is just a simple Script that will allow supporting touch event on all devices.
Demo: https://liimonx.github.io/TouchEvent/
Installation
npm
npm i TouchEvent.js
Now add it to your project:
Webpack
import TouchEvent from 'TouchEvent'
HTML
<script src="./TouchEvent/dist/TouchEvent.js"></script>
Usage
new TouchEvent('.name_of_element', (event) => {
console.log(event.startX)
console.log(event.startY)
console.log(event.endX)
console.log(event.endY)
console.log(event.walkX)
console.log(event.walkY)
console.log(event..target)
})
Licence
Neon is under MIT licence
1.0.0
5 years ago