O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

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 Default Settings

<script src="../js/jquery-2.0.3.min.js"></script> <script>   $(document).bind( "mobileinit", function () {     $.mobile.page.prototype.options.headerTheme = "b";     $.mobile.page.prototype.options.footerTheme = "b";   }); </script> <script src="../js/jquery.mobile-custom.min.js"></script>

jQuery Mobile is initialized when the library is loaded. Any page elements with jQuery Mobile tags are initialized as well and use the default settings to create mobile versions of the elements.

Occasionally, you may want to override the default settings. To do this, you need to add a mobileinit event handler to the document object before loading the jQuery Mobile library. Then you ...

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