Initialization options - senchalabs/jQTouch GitHub Wiki
Options can be passed to jQT's object constructor:
var jQT = new $.jQT({ // `new` keyword is now mandatory (was optional before rc6)
option: value
});
Guide
- option:
default
-- description.
Options
- addGlossToIcon:
true
-- Set to false to prevent automatic glossy button effect on icon. - backSelector:
'.back, .cancel, .goback'
-- A CSS selector for back links/buttons. When clicked, the page history goes back one, automatically reversing whichever entrance animation was used. - cacheGetRequests:
true
-- Automatically caches GET requests, so subsequent taps reference the pre-loaded views. - cubeSelector:
'.cube'
-- Link selector for a cube animation. - dissolveSelector:
'.dissolve'
-- Link selector for a dissolve animation. - fadeSelector: '.fade' -- Link selector for a fade animation.
- fixedViewport:
true
- Removes the user's ability to scale the page. Ensures the site behaves more like an application. - flipSelector:
'.flip'
- Link selector for a 3d flip animation. - formSelector:
'form'
- Sets which forms are automatically submitted via Ajax. - fullScreen:
true
- The website will become a fullscreen application when saved to a user's home screen. Set tofalse
to disable. - fullScreenClass:
'fullscreen'
- Adds a class to the<body>
when running in full-screen mode, to allow for easy detection and styling. Set tofalse
to disable. - icon:
false
- Sets the home screen icon for the application. To use, pass a string path for a 57x57px PNG. Ex:icon: 'images/appicon.png'
- popSelector:
'.pop'
- Link selector for a pop animation. - preloadImages:
false
- Pass an array of image paths to load them before page loads. Ex:['images/link_over.png', 'images/link_select.png']
- slideSelector:
'body > * > ul li a'
- Link selector for the default slide-left transition. By default applies to all links within an unordered list. Accepts any jQuery-capable selector'li > a, a:not(.dontslide)'
, etc. - slideupSelector:
'.slideup'
- Link selector for a slide up animation. - startupScreen: null - Pass a string path to a 320px x 460px startup screen for full screen apps.
- statusBar:
'default'
- Styles the status bar when running as a fullscreen app. Other options areblack
, andblack-translucent
. - submitSelector:
'.submit'
- Selector which, when clicked, will submit its parent form (and close keyboard if open). - swapSelector:
'.swap'
-- Link selector for 3d swap animation. - touchSelector:
'a, .touch'
- Selector for items which are automatically given expanded touch events. This makes ordinary links more responsive and provides trigger events likeswipe
- useAnimations:
true
-- Set tofalse
to disable all animations. - useFastTouch: (Experimental)
true
-- Removes ~350ms onClick delay when tapping a link (use in conjunction with the .tap() event) - useTouchScroll: (Experimental)
true
-- Adds support for iOS5 scrolling. Set to false to disable.