Swiped.js

Demo (use mobile or emulate touches mode on your browser)

Features
- Dependency-free.
- Short & long swipe.
- Swipe to delete.
- Easy to use.
- CSS transforms & transitions.
Installation
npm install swiped
bower install swiped
API
Swiped(options)
options
(object) - Options to configure a new instance of Swiped.[options.query]
(string) - Query selector.[options.duration]
(number) - The time (milliseconds) to open/close the element. Default:200
.[options.tolerance]
(number) - Default:150
.[options.time]
(number) - Time for short swipe. Default:200
.[options.left]
(number) - Distance for swipe from left to right. Default:0
.[options.right]
(number) - Distance for swipe from right to left. Default:0
.[options.list]
(boolean) - Elements depend on each other. Default:false
.[options.onOpen]
(function).[options.onClose]
(function).
var s = Swiped; s;s;s;s
Usage
Example of the html markup for single element:
elem1
for multiple:
elem3 elem4 elem5
for switch:
element 16
initialization for single element:
var s1 = Swiped;
for multiple:
var s2 = Swiped;
for switch:
var s3 = Swiped; document;
Implementation for "swipe to delete"
Swiped;