Skip to content

A simple jQuery TouchSwipe loader plugin for Typesetter CMS

License

Notifications You must be signed in to change notification settings

juek/TouchSwipeLoader

Repository files navigation

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.

About

A simple jQuery TouchSwipe loader plugin for Typesetter CMS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published