Skip to content

Instantly share code, notes, and snippets.

Created February 23, 2010 05:08
What would you like to do?
How to load jQTouch to a different div than the main one
<script type="text/javascript">
// Save the hash the user loaded the page with
var page = (location.hash) ? location.hash : '';
// When you instantiate the jQTouch object, it will revert the hash to the top div on the page or the div with class="current"
$jQT = new $.jQTouch({
icon: 'jqtouch.png',
statusBar: 'black-translucent',
preloadImages: [
$(document).ready(function() {
// If we have page set, make jQTouch go to that page
if (page) jQT.goTo(page, 'slide');
Copy link

mjangda commented May 6, 2010

Glad to help! And thanks for pointing out the typo -- fixed now!

Copy link

'slide' will also make you issues, now, 4 years late, you have to write either slideup, slidedown, slideleft, slideright, flip... for more info about these options, you can ad before the end of above script console.log(jQT) to see full list of animations, settings and other useful stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment