|
1 | 1 | <?php if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest') { ?>
|
2 | 2 | <!DOCTYPE html>
|
3 | 3 | <html>
|
4 |
| - <head> |
| 4 | +<head id="document-head"> |
| 5 | + |
| 6 | + <!-- The various documents reachable from within your navigation system must all have the |
| 7 | + necessary header information to be able to launch your application. Nevertheless, the |
| 8 | + server only needs to send this header information with the first request by the user. On |
| 9 | + Ajax requests by the application, this information can be discarded server-side in order |
| 10 | + to save bandwidth and to improve the time it takes to display a page. --> |
5 | 11 | <meta charset="utf-8">
|
6 | 12 | <meta name="viewport" content="width=device-width, initial-scale=1">
|
7 | 13 | <title>Ajax optimized persistent toolbars - jQuery Mobile Demos</title>
|
|
12 | 18 | <script src="../../external/jquery/jquery.js"></script>
|
13 | 19 | <script src="../_assets/js/"></script>
|
14 | 20 | <script src="../../js/"></script>
|
| 21 | + |
| 22 | + <!-- This script contains the code that is shared between all the documents of your |
| 23 | + application. It is responsible for enhancing the shared widgets during your application's |
| 24 | + startup. --> |
15 | 25 | <script id="shared-widget-init" src="shared-widget-init.js"></script>
|
16 | 26 | </head>
|
17 | 27 | <body>
|
18 | 28 | <div id="shared-header" data-role="header" data-position="fixed" data-theme="a">
|
19 |
| - <!-- Shared header markup must be added to all pages of the demo to ensure any of them can |
20 |
| - serve as the start page. The server can be instructed to omit sending this portion of |
21 |
| - the data whenever the request for the document is made via Ajax. --> |
| 29 | + <!-- Shared header markup must be added to all documents of the demo to ensure any of them |
| 30 | + can serve as the start page. The server can be instructed to omit sending this portion |
| 31 | + of the data whenever the request for the document is made via Ajax. --> |
22 | 32 | <a href="../toolbar/" data-rel="back" class="ui-btn ui-btn-left ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-notext ui-icon-carat-l">Back</a>
|
23 | 33 | <a href="#nav-menu" data-rel="popup" class="ui-btn ui-btn-right ui-alt-icon ui-nodisc-icon ui-corner-all ui-btn-icon-right ui-icon-navigation">Navigation</a>
|
24 | 34 | <div data-role="popup" id="nav-menu" data-theme="a">
|
|
50 | 60 |
|
51 | 61 | <h2>Shared scripts and widgets</h2>
|
52 | 62 | <p>Any one of the pages in this demo must be able to serve as the start page for your application. Thus, when accessed via plain HTTP, the server will return the full page, including references to jQuery and jQuery Mobile, as well as custom scripts which ensure that widgets shared by all the pages in the application are initialized at startup, no matter which page the user chooses as their start page. Thus, you must copy references to jQuery, jQuery Mobile, and your custom startup script(s) to the <code><head></code> section of each of your documents, and all shared widgets to the corresponding <code><body></code> section.</p>
|
53 |
| - <div data-demo-html="#shared-header,#shared-navbar" data-demo-js="#shared-widget-init"></div> |
| 63 | + <div data-demo-html="#document-head,#shared-header,#shared-navbar" data-demo-js="#shared-widget-init"></div> |
54 | 64 |
|
55 | 65 | </div><!-- /content -->
|
56 | 66 |
|
|
0 commit comments