Handling Swipe Up/Down/Left/Right Events By Vanilla JavaScript | basicSwipe.js

basicSwipe.js, just include swipeDown, swipeUp, swipeLeft and swipeRight by vanilla javascript. A basic touch gesture handling library that allows you to add event listeners in any of the DOM elements.

swipe up and down gesture android, touch events and gestures in mobile application, swipe gesture example code, swipe left and right in recyclerview

How to make use of it:

1. Import the fundamentalSwipe.js JavaScript library.

<script src="./basicSwipe.js"></script>

2. Add swipe occasion listeners to components as follows:

var example = document.querySelector('.example'),

addSwipeEvent(example, "swipeUp", function(){
  // do something
});

addSwipeEvent(example, "swipeDown", function(){
  // do something
});

addSwipeEvent(example, "swipeLeft", function(){
  // do something
});

addSwipeEvent(example, "swipeRight", function(){
  // do something
});

Handling Swipe Up/Down/Left/Right Events, basicSwipe.js Plugin/Github, leftright swipe button


See Demo And Download

Official Website(taosapp): Click Here

This superior jQuery/javascript plugin is developed by taosapp. For extra Advanced Usages, please go to the official website.

Leave a Comment