Simply loads the jQuery TouchSwipe plugin (currently ver 1.6) to be used in your JavaScripts. That’s all.
See also
1.6
- Typesetter CMS
- Download the master ZIP archive
- Upload the extracted folder 'TouchSwipeLoader-master' to your server into the /addons directory
- Install using Typesetter's Admin Toolbox → Plugins → Manage → Available → TouchSwipe Loader
JavaScript (e.g. in existing scripts)
$(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});
});
PHP (e.g. in template.php or your plugin’s getHead hook)
global $page;
$page->jQueryCode .= '
$("#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});
';
http://labs.rampinteractive.co.uk/touchSwipe
http://labs.rampinteractive.co.uk/touchSwipe/docs
Dual licensed under the MIT or GPL Version 2 licenses.