Configuring jQuery Mobile
When jQuery Mobile initializes, it triggers a mobileinit
event on the document
object. You can bind to the mobileinit
event and apply overrides to jQuery Mobile's ($.mobile
) default configuration settings. In addition, you can extend jQuery Mobile with additional behavior and properties. For instance, there are two ways to configure jQuery Mobile as shown in the examples below. You can either override the properties via jQuery's extend
method or individually.
Examples:
// Configure properties via jQuery's extend method
$( document ).bind( "mobileinit", function(){
$.extend( $.mobile, {
// Override loading message
loadingMessage: "Loading...",
// Override default transition from “slide” to “pop” defaultTransition: ...
Get Pro jQuery Mobile now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.