Skip to content

Commit 61e4545

Browse files
author
Gabriel Schulhof
committed
Entries and pages: Replace AJAX with Ajax
Fixes gh-214
1 parent 46c4281 commit 61e4545

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

entries/dialog.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<p>You can open a dialog programmatically by calling the <a href="/jQuery.mobile.changePage/"><strong>$.mobile.changePage</strong></a> method:</p>
1717
<pre><code><![CDATA[
18-
// Dialog loaded via AJAX
18+
// Dialog loaded via Ajax
1919
$.mobile.changePage( "path/to/dialog.html", { role: "dialog" } );
2020
2121
// Dialog present in a multipage document

entries/loader.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<?xml-stylesheet type="text/xsl" href="../entries2html.xsl" ?>
33
<entry name="loader" namespace="fn" type="widget" widgetnamespace="mobile" event-prefix="loading">
44
<title>Loader Widget</title>
5-
<desc>Handles the task of displaying the loading dialog when jQuery Mobile pulls in content via AJAX. </desc>
5+
<desc>Handles the task of displaying the loading dialog when jQuery Mobile pulls in content via Ajax. </desc>
66
<longdesc>
77
<h2>The Loader Widget</h2>
8-
<p>The loader widget handles the task of displaying the loading dialog when jQuery Mobile pulls in content via AJAX. It can also be displayed manually for custom loading actions using the <code>$.mobile.loading</code> helper method (See the global method docs).</p>
8+
<p>The loader widget handles the task of displaying the loading dialog when jQuery Mobile pulls in content via Ajax. It can also be displayed manually for custom loading actions using the <code>$.mobile.loading</code> helper method (See the global method docs).</p>
99
<p>To configure the loading dialog globally the following settings can be defined on its prototype during the <code>mobileinit</code> event.</p> Below are the defaults:
1010

1111
<pre><code><![CDATA[

entries/pagecontainer.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
]]></code></pre>
4444
<iframe src="/resources/pagecontainer/example1.html" style="width:100%;height:200px;border:0px;"></iframe>
4545

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:
4848
<ol>
4949
<li>The global configuration option <code>$.mobile.linkBindingEnabled</code> must be <code>true</code>.</li>
5050
<li>The click event's default must not be prevented and it must be a left-click.</li>
@@ -60,10 +60,10 @@
6060
<li>The link must be to the same domain or it must be to a permitted cross-domain-request destination.</li>
6161
</ol>
6262
</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>
6464

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>
6767
</longdesc>
6868

6969
<added>1.4</added>
@@ -423,7 +423,7 @@ $( ":mobile-pagecontainer" ).on( "pagecontainershow", function( event, ui ) {
423423
</desc>
424424
</property>
425425
<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>
427427
<type name="Object">
428428
<desc></desc>
429429
</type>

pages/global-config.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ <h2>Configurable options</h2>
7878
<div class="warning"><strong>Deprecated</strong> in 1.4 - use <code>$.mobile.hoverDelay</code> instead.</dd>
7979
<br />
8080
<dt id="defaultDialogTransition"><code>defaultDialogTransition</code> <em>string</em>, default: 'pop'</dt>
81-
<dd>Set the default transition for dialog changes that use AJAX. Set to 'none' for no transitions.
81+
<dd>Set the default transition for dialog changes that use Ajax. Set to 'none' for no transitions.
8282
<div class="warning"><strong>Deprecated</strong> in 1.4.</div>
8383
<p>When using pages styled as dialogs (<code>data-role="page" data-dialog="true"</code>), if you wish for them to have a different transition than regular pages, you must specify the transition on the link that opens them by adding the attribute <code>data-transition="pop"</code> to the link. "pop" is just an example. You may specify any transition you wish, such as "slide", "flip", or "none".</p>
8484
<p>Similarly, when calling the <a href="/pagecontainer/">pagecontainer</a>'s <code>change()</code> method, you must also specify the transition explicitly, if you wish it to be different from the <code>$.mobile.defaultPageTransition</code>:

0 commit comments

Comments
 (0)