A simple jQuery TouchSwipe loader plugin for Typesetter CMS
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes
.gitignore
Addon.ini
LICENSE
README.md
TouchSwipe.php
jquery.touchSwipe.js
jquery.touchSwipe.min.js

README.md

TouchSwipe Loader plugin for Typesetter CMS

Simply loads the jQuery TouchSwipe plugin (currently ver 1.6) to be used in your JavaScripts. That’s all.

See also

Current Version

1.6

Requirements

  • Typesetter CMS

Manual Installation

  1. Download the master ZIP archive
  2. Upload the extracted folder 'TouchSwipeLoader-master' to your server into the /addons directory
  3. Install using Typesetter's Admin Toolbox → Plugins → Manage → Available → TouchSwipe Loader

Usage

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});
';

Demos, Examples and Docs

http://labs.rampinteractive.co.uk/touchSwipe
http://labs.rampinteractive.co.uk/touchSwipe/docs

License

Dual licensed under the MIT or GPL Version 2 licenses.