Skip to content

Initialization options

kaleidobug edited this page Apr 5, 2012 · 6 revisions

-After you initialize jQTouch, you can pass in options like this: 2

3 -``` 4 -var jQT = new jQTouch({ 5

  • option: value 6 -}); 7 -``` 8

9 -#### Guide 10

11 -* option: default -- description. 12

13 -#### Options 14

15 -* addGlossToIcon: true -- Set to false to prevent automatic glossy button effect on icon. 16 -* 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. 17 -* cacheGetRequests: true -- Automatically caches GET requests, so subsequent taps reference the pre-loaded views. 18 -* cubeSelector: '.cube' -- Link selector for a cube animation. 19 -* dissolveSelector: '.dissolve' -- Link selector for a dissolve animation. 20 -* fadeSelector: '.fade' -- Link selector for a fade animation. 21 -* fixedViewport: true - Removes the user's ability to scale the page. Ensures the site behaves more like an application. 22 -* flipSelector: '.flip' - Link selector for a 3d flip animation. 23 -* formSelector: 'form' - Sets which forms are automatically submitted via Ajax. 24 -* fullScreen: true - The website will become a fullscreen application when saved to a user's home screen. Set to false to disable. 25 -* fullScreenClass: 'fullscreen' - Adds a class to the <body> when running in full-screen mode, to allow for easy detection and styling. Set to false to disable. 26 -* 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' 27 -* popSelector: '.pop' - Link selector for a pop animation. 28 -* preloadImages: false - Pass an array of image paths to load them before page loads. Ex: ['images/link_over.png', 'images/link_select.png'] 29 -* 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. 30 -* slideupSelector: '.slideup' - Link selector for a slide up animation. 31 -* startupScreen: null - Pass a string path to a 320px x 460px startup screen for full screen apps. 32 -* statusBar: 'default' - Styles the status bar when running as a fullscreen app. Other options are black, and black-translucent. 33 -* submitSelector: '.submit' - Selector which, when clicked, will submit its parent form (and close keyboard if open). 34 -* swapSelector: '.swap' -- Link selector for 3d swap animation. 35 -* touchSelector: 'a, .touch' - Selector for items which are automatically given expanded touch events. This makes ordinary links more responsive and provides trigger events like swipe 36 -* useAnimations: true -- Set to false to disable all animations. 37 -* useFastTouch: (Experimental) true -- Removes ~350ms onClick delay when tapping a link (use in conjunction with the .tap() event) 38 -* useTouchScroll: (Experimental) true -- Adds support for iOS5 scrolling. Set to false to disable.

Clone this wiki locally