Skip to content
Thomas @ BeeDesk edited this page Feb 19, 2014 · 7 revisions

Download a copy of jQTouch from GitHub

1. Add Scripts and links to your HTML

<style type="text/css" media="screen">@import "../../themes/css/jqtouch.css";</style>
<script src="../../src/lib/zepto.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../src/jqtouch.min.js" type="text/javascript" charset="utf-8"></script>

Using jQuery

By default, jQTouch uses Zepto.js which has a similar API to jQuery, but is much more lightweight. If you need to use jQuery instead, simply replace the Zepto.js script above with jQuery (last tested against 1.7), and use the jQuery version of jQTouch:

2. Initialize

Initialize the function before the page onload event. To turn off a feature, simply pass a false to the corresponding option in the [initialization options] (Initialization Options).

var jQT = new $.jQTouch({    // `new` keyword is now mandatory (was optional before rc6).
    icon: 'jqtouch.png',
    statusBar: 'black-translucent',
    preloadImages: []
});

3. Extend

  • [Initialization Options](Initialization Options) -- Overview of all basic capabilities, including navigation, viewport control, and image preloading.
  • [Callback Events](Callback Events) -- How to receive notifications from jQTouch.
Clone this wiki locally