Skip to content

Commit e40db5e

Browse files
laughinghanmgol
authored andcommitted
jQuery.post: Mark jqXHR.always() as added in 1.6
While I'm there, fix missing `<code/>`
1 parent 8235e7b commit e40db5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

entries/jQuery.post.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $.post( "ajax/test.html", function( data ) {
5050
<p>This example fetches the requested HTML snippet and inserts it on the page.</p>
5151
<p>Pages fetched with <code>POST</code> are never cached, so the <code>cache</code> and <code>ifModified</code> options in <code><a href="/jQuery.ajaxSetup/">jQuery.ajaxSetup()</a></code> have no effect on these requests.</p>
5252
<h4 id="jqxhr-object">The jqXHR Object</h4>
53-
<p><strong>As of jQuery 1.5</strong>, all of jQuery's Ajax methods return a superset of the <code>XMLHTTPRequest</code> object. This jQuery XHR object, or "jqXHR," returned by <code>$.get()</code> implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see <a href="/category/deferred-object/">Deferred object</a> for more information). The <code>jqXHR.done()</code> (for success), <code>jqXHR.fail()</code> (for error), and <code>jqXHR.always()</code> (for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the <a href="/jQuery.ajax/#jqXHR">jqXHR Object</a> section of the $.ajax() documentation.</p>
53+
<p><strong>As of jQuery 1.5</strong>, all of jQuery's Ajax methods return a superset of the <code>XMLHTTPRequest</code> object. This jQuery XHR object, or "jqXHR," returned by <code>$.get()</code> implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see <a href="/category/deferred-object/">Deferred object</a> for more information). The <code>jqXHR.done()</code> (for success), <code>jqXHR.fail()</code> (for error), and <code>jqXHR.always()</code> (for completion, whether success or error; added in jQuery 1.6) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the <a href="/jQuery.ajax/#jqXHR">jqXHR Object</a> section of the <code>$.ajax()</code> documentation.</p>
5454
<p>The Promise interface also allows jQuery's Ajax methods, including <code>$.get()</code>, to chain multiple <code>.done()</code>, <code>.fail()</code>, and <code>.always()</code> callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.</p>
5555
<pre><code>
5656
// Assign handlers immediately after making the request,
@@ -66,7 +66,7 @@ var jqxhr = $.post( "example.php", function() {
6666
})
6767
.always(function() {
6868
alert( "finished" );
69-
});
69+
});
7070

7171
// Perform other work here ...
7272

0 commit comments

Comments
 (0)