the author assumes no responsibility for content

Code example: JQTouch page swipe

leave a comment »

For anyone who can’t get this to work properly:

Specify your ‘class’ identifier for the action:

var jQT = $.jQTouch({
touchSelector: ‘.swipe’

AND specify what to do on swiping:

$(‘#main_page’).bind(“swipe”,function(event, info){
if (info.direction === ‘left’) {
jQT.goTo($(‘#page1’), ‘slide’);
$(‘#main_page’).bind(“swipe”,function(event, info){
if (info.direction === ‘right’) {
jQT.goTo($(‘#page2’), ‘slide’);

AND in your html name the div you want affected the relevant class (in this case it’s the div for my whole page):

<div id=”main_page” class=”swipe”>


Written by mirmedical

March 11, 2011 at 6:58 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: