TouchSwipe is a jquery plugin to be used with jQuery on touch input devices such as iPad, iPhone etc.
See the codeA jQuery plugin to be used on touch devices such as iPad, iPhone, Android etc.
Detects single and multiple finger swipes, pinches and falls back to mouse 'drags' on the desktop.
Time and distance thresholds can be set to distinguish between swipe gesture and slow drag.
Allows exclusion of child elements (interactive elements) as well allowing page scrolling or page zooming depending on configuration.
http://labs.rampinteractive.co.uk/touchSwipe
http://labs.rampinteractive.co.uk/touchSwipe/docs
npm install jquery-touchswipe --save
bower install jquery-touchswipe --save
Include the minified file in your project.
<script type="text/javascript" src="js/jquery.touchSwipe.min.js"></script>
$(function() {
$("#test").swipe( {
//Generic swipe handler for all directions
swipe:function(event, direction, distance, duration, fingerCount, fingerData) {
$(this).text("You swiped " + direction );
}
});
//Set some options later
$("#test").swipe( {fingers:2} );
});
For full demos, code examples and documentation, see below.
Install dependencies
npm install
To minify
npm run minify
To build docs
npm run docs
To do both
npm run build
266 followers · starred Feb 2013
13,747 followers · starred Jun 2013
35 followers · starred May 2013
119 followers · starred Jun 2017
TouchSwipe is a jquery plugin to be used with jQuery on touch input devices such as iPad, iPhone etc.
See the codeA jQuery plugin to be used on touch devices such as iPad, iPhone, Android etc.
Detects single and multiple finger swipes, pinches and falls back to mouse 'drags' on the desktop.
Time and distance thresholds can be set to distinguish between swipe gesture and slow drag.
Allows exclusion of child elements (interactive elements) as well allowing page scrolling or page zooming depending on configuration.
http://labs.rampinteractive.co.uk/touchSwipe
http://labs.rampinteractive.co.uk/touchSwipe/docs
npm install jquery-touchswipe --save
bower install jquery-touchswipe --save
Include the minified file in your project.
<script type="text/javascript" src="js/jquery.touchSwipe.min.js"></script>
$(function() {
$("#test").swipe( {
//Generic swipe handler for all directions
swipe:function(event, direction, distance, duration, fingerCount, fingerData) {
$(this).text("You swiped " + direction );
}
});
//Set some options later
$("#test").swipe( {fingers:2} );
});
For full demos, code examples and documentation, see below.
Install dependencies
npm install
To minify
npm run minify
To build docs
npm run docs
To do both
npm run build
266 followers · starred Feb 2013
13,747 followers · starred Jun 2013
35 followers · starred May 2013
119 followers · starred Jun 2017