TouchSwipe events made easy, by LCweb
No dependencies
vanilla javascript class to easily handle swipe events on page elements.
- gives you the swipe delta in each direction
- supports multiple instances per element
- features a destroy public method (targeting the specific instance)
What do you want more from 2KB of code? :P
NB: obviously it works only for touch devices.
Installation & Usage
1. include lc-swiper.min.js
2. initialize plugin targeting one/multiple page elements and the callback function triggered after each swipe.
NB: first parameter may be a textual selector or a DOM object (yes, also jQuery objects)
You must use a valid callback function as second parameter. It will be triggered each time a swipe event is performed.
It has got two parameters:
``
``
*
Copyright © Luca Montanari -
LCweb