TouchSwipe events made easy, with LCweb vanilla javascript class to easily handle rollover events on-page elements. LC-Swiper is a small JavaScript (ES6) library designed to handle swipe-to-touch events on specific items.
- It gives you a swipe delta in every direction
- Supports multiple states for each item
- Features a general destructive method (targeting a specific instance)
css swipe carousel, swiper slider codepen, swiper set active slide, swiper custom pagination, javascript swipe event, swiper slider bootstrap
How to make use of it:
1. Import the JavaScript file lc-swiper.js
into the doc.
<script src="lc-swiper.min.js"></script>
2. Create a brand new occasion of the LC-Swiper and decide the goal aspect on which you need to detect contact swipe occasions.
<div id="targetContainer"> <h2>Swipe here!</h2> </div>
const swiper = new lc_swiper('#targetContainer');
3. Trigger a function each time you swipe on that aspect.
const swiper = new lc_swiper('#targetContainer', function(directions, $el){ // do something // directions.top // directions.right // directions.bottom // directions.left });
Minimal JavaScript Library For Handling Touch Swipe Events, TouchSwipe events Plugin/Github, html swipe leftright, swiper disable swipe
See Demo And Download
Official Website(LCweb-ita): Click Here
This superior jQuery/javascript plugin is developed by LCweb-ita. For extra Advanced Usages, please go to the official website.
Be First to Comment