Swipe - a lightweight jQuery plugin
This is a lightweight jQuery plugin that allows you to handle user swipes.
Getting started
Prerequisites
This plugin requires the latest version of jQuery
Usage
Include above
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
This is a lightweight jQuery plugin that allows you to handle user swipes.
This plugin requires the latest version of jQuery
Include above
tag, but below jQuery include script tags.
Hook to the element which you wish to observe like so:
.onSwipe() accepts a few parameters in the following order:
function(result) - Required! A function that will handle results of swiping
timeTreshold - A treshold below which swipes will not register. (ms) Not required, default 100ms
tresholdX - A treshold below which swipes will not register on the horizontal axis. (px) Not required, default 30px.
tresholdY - A treshold below which swipes will not register on the vertical axis. (px) Not required, default 30px.
Results are returned in the following object:
This project was developed by Gvozden Despotovski.
This project is licensed under the MIT License - see the LICENSE.md file for details
A small jQuery plugin for handling touch event swipes.