|
43 | 43 | ]]></code></pre>
|
44 | 44 | <iframe src="/resources/pagecontainer/example1.html" style="width:100%;height:200px;border:0px;"></iframe>
|
45 | 45 |
|
46 |
| - <h3>HTTP-analogous navigation via AJAX</h3> |
47 |
| - <p>jQuery Mobile allows you to replace the browser's standard HTTP navigation with AJAX-based navigation. It overrides the browser's default link handling behavior. It intercepts clicks on anchors containing links to other documents and upon each such click it checks whether the document can be retrieved via AJAX. A link has to meet the following criteria in order for the document to which it links to be retrieved via AJAX: |
| 46 | + <h3>HTTP-analogous navigation via Ajax</h3> |
| 47 | + <p>jQuery Mobile allows you to replace the browser's standard HTTP navigation with Ajax-based navigation. It overrides the browser's default link handling behavior. It intercepts clicks on anchors containing links to other documents and upon each such click it checks whether the document can be retrieved via Ajax. A link has to meet the following criteria in order for the document to which it links to be retrieved via Ajax: |
48 | 48 | <ol>
|
49 | 49 | <li>The global configuration option <code>$.mobile.linkBindingEnabled</code> must be <code>true</code>.</li>
|
50 | 50 | <li>The click event's default must not be prevented and it must be a left-click.</li>
|
|
60 | 60 | <li>The link must be to the same domain or it must be to a permitted cross-domain-request destination.</li>
|
61 | 61 | </ol>
|
62 | 62 | </p>
|
63 |
| - <p>If these criteria are met jQuery Mobile retrieves the document via AJAX. It is important to realize that, while the document is retrieved in its entirety, only the first jQuery Mobile page is displayed. The header and the rest of the body are discarded. Thus, it is not possible to retrieve a multi-page document via AJAX, nor is it possible to execute scripts located in the header.</p> |
| 63 | + <p>If these criteria are met jQuery Mobile retrieves the document via Ajax. It is important to realize that, while the document is retrieved in its entirety, only the first jQuery Mobile page is displayed. The header and the rest of the body are discarded. Thus, it is not possible to retrieve a multi-page document via Ajax, nor is it possible to execute scripts located in the header.</p> |
64 | 64 |
|
65 |
| - <p>After AJAX retrieval, jQuery Mobile displays the page via a transition. The transition can be specified on the link that opens the page using the <code>data-transition</code> attribute. If no transition is specified, then <code>$.mobile.defaultPageTransition</code> is used or, if the incoming page is a dialog, then <code>$.mobile.defaultDialogTransition</code> is used. <strong>Note: The dialog widget is deprecated as of jQuery Mobile 1.4.0 and will be removed in 1.5.0.</strong></p> |
66 |
| - <p>If the browser supports the <code>replaceState</code> API the location bar is updated such that it displays the URL of the document that was retrieved via AJAX. This latter step has the following implication for site/application design: Since the user can copy the URL of a page other than the start page, the application must be designed such that it can start from any of its pages. The best way to achieve this is to include jQuery Mobile and your application code in the header for all the pages of the site/application, and ensure initial state consistency during the <code>pagecreate</code> event.</p> |
| 65 | + <p>After Ajax retrieval, jQuery Mobile displays the page via a transition. The transition can be specified on the link that opens the page using the <code>data-transition</code> attribute. If no transition is specified, then <code>$.mobile.defaultPageTransition</code> is used or, if the incoming page is a dialog, then <code>$.mobile.defaultDialogTransition</code> is used. <strong>Note: The dialog widget is deprecated as of jQuery Mobile 1.4.0 and will be removed in 1.5.0.</strong></p> |
| 66 | + <p>If the browser supports the <code>replaceState</code> API the location bar is updated such that it displays the URL of the document that was retrieved via Ajax. This latter step has the following implication for site/application design: Since the user can copy the URL of a page other than the start page, the application must be designed such that it can start from any of its pages. The best way to achieve this is to include jQuery Mobile and your application code in the header for all the pages of the site/application, and ensure initial state consistency during the <code>pagecreate</code> event.</p> |
67 | 67 | </longdesc>
|
68 | 68 |
|
69 | 69 | <added>1.4</added>
|
@@ -423,7 +423,7 @@ $( ":mobile-pagecontainer" ).on( "pagecontainershow", function( event, ui ) {
|
423 | 423 | </desc>
|
424 | 424 | </property>
|
425 | 425 | <property name="data" default="undefined">
|
426 |
| - <desc>The data to send with an AJAX page request.</desc> |
| 426 | + <desc>The data to send with an Ajax page request.</desc> |
427 | 427 | <type name="Object">
|
428 | 428 | <desc></desc>
|
429 | 429 | </type>
|
|
0 commit comments