5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>jQuery Mobile Docs - Configuration</title>
7 <link rel="stylesheet" href="../../css/themes/default/jquery.mobile.css" />
8 <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
10 <script src="../../js/jquery.js"></script>
11 <script src="../../docs/_assets/js/jqm-docs.js"></script>
13 $(document).bind("mobileinit", function(){
14 $.mobile.loadingMessageTextVisible = true;
18 <script src="../../js/"></script>
23 <div data-role="page">
25 $(document).on("click", ".show-page-loading-msg", function() {
26 var $this = $( this ),
27 theme = $this.jqmData("theme") || $.mobile.loadingMessageTheme,
28 msgText = $this.jqmData("msgtext") || $.mobile.loadingMessage,
29 textonly = !!$this.jqmData("textonly");
30 $.mobile.showPageLoadingMsg(theme, msgText, textonly);
32 .on("click", ".hide-page-loading-msg", function() {
33 $.mobile.hidePageLoadingMsg();
37 <div data-role="header" data-theme="f">
38 <h1>Config applied</h1>
39 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
40 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
41 </div><!-- /header -->
43 <div data-role="content">
45 <h2>loadingMessage text is now visible</h2>
46 <p>To test, hit the button below and browse the docs. Note that if a link causes a refresh, this setting will be lost and the default settings will be seen.</p>
47 <a href="../../index.html" data-role="button" data-icon="arrow-r" data-iconpos="right">Browse docs</a>
49 <p>To display the loading message on demand:</p>
50 <pre><code>$.mobile.showPageLoadingMsg();</code></pre>
51 <p>Click the buttons below to show and hide the loading message with the default options.</p>
52 <div data-role="controlgroup">
53 <button class="show-page-loading-msg" data-inline="false" data-icon="arrow-r" data-iconpos="right">Show</button>
54 <button class="hide-page-loading-msg" data-inline="false" data-icon="delete" data-iconpos="right">Hide</button>
57 <h2>Theming the loading message</h2>
58 <p>To display the loading message with a different theme and message:</p>
59 <pre><code>$.mobile.showPageLoadingMsg(<strong>"a", "Loading theme a..."</strong>);</code></pre>
60 <p>The theme and message can be changed on the fly by calling the method again. Click the buttons below to see the loading message with the indicated theme.</p>
61 <div data-role="controlgroup">
62 <button class="show-page-loading-msg" data-theme="a" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme a...">Theme a</button>
63 <button class="show-page-loading-msg" data-theme="b" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme b...">Theme b</button>
64 <button class="show-page-loading-msg" data-theme="c" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme c...">Theme c</button>
65 <button class="show-page-loading-msg" data-theme="d" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme d...">Theme d</button>
66 <button class="show-page-loading-msg" data-theme="e" data-icon="arrow-r" data-iconpos="right" data-msgtext="Loading theme e...">Theme e</button>
67 <button class="hide-page-loading-msg" data-icon="delete" data-iconpos="right">Hide</button>
70 <h2>Text only messages</h2>
71 <p>To display the loading message with no spinner:</p>
72 <pre><code>$.mobile.showPageLoadingMsg("a", "No spinner", <strong>true</strong>);</code></pre>
73 <p>Click the button below to see the loading message with no spinner.</p>
74 <div data-role="controlgroup">
75 <button class="show-page-loading-msg" data-textonly="true" data-msgtext="Look Ma, no spinner!" data-icon="arrow-r" data-iconpos="right">Show</button>
76 <button class="hide-page-loading-msg" data-inline="false" data-icon="delete" data-iconpos="right">Hide</button>
80 </div><!-- /ui-body wrapper -->