O'Reilly logo

jQuery Mobile by Jon Reid

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring jQuery Mobile

jQuery Mobile has several configuration options that you can set that will alter its behavior across all pages.

Available Options

string activeBtnClass

The CSS class applied to active buttons. Default: “ui-btn-active”.

string activePageClass

The CSS class applied to the page that is currently visible. Default: “ui-page-active”.

boolean ajaxEnabled

Enable or disable asynchronous features: ajax form handling, ajax link handling, and URL hash management. Setting this to false will disable all three features. Defaults to true.

boolean ajaxFormsEnabled

Enable or disable asynchronous form handling. Defaults to true.

boolean ajaxLinksEnabled

Enable or disable asynchronous link handling. Defaults to true.

string defaultTransition

The default transition animation to show when transitioning between pages. Defaults to “slide”.

boolean hashListeningEnabled

Enable or disable hash management. Defaults to true.

gradeA

jQuery Mobile extends the base jQuery.support object with a new property: mediaquery. gradeA is an alias to that property. This gives you fine control over required features that must be in place for your application to function. To use this property, define a function that detects the feature in question and returns either true or false (see Example 5-13).

string loadingMessage

The string to display in the loading indicator dialog. Defaults to “Loading”.

string nonHistorySelectors

If a page has a data-rel or data-role set to one of these selectors, it will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required