From da1babc498f0e6112cb5553d699db2379b300748 Mon Sep 17 00:00:00 2001
From: Andrea Rendine This example fetches the requested HTML snippet and inserts it on the page. Pages fetched with As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the The Promise interface also allows jQuery's Ajax methods, including POST
are never cached, so the cache
and ifModified
options in jQuery.ajaxSetup()
have no effect on these requests.The jqXHR Object
- XMLHTTPRequest
object. This jQuery XHR object, or "jqXHR," returned by $.get()
implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done()
(for success), jqXHR.fail()
(for error), and jqXHR.always()
(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 jqXHR Object section of the $.ajax()
documentation.XMLHTTPRequest
object. This jQuery XHR object, or "jqXHR," returned by $.post()
implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done()
(for success), jqXHR.fail()
(for error), and jqXHR.always()
(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 jqXHR Object section of the $.ajax()
documentation.$.get()
, to chain multiple .done()
, .fail()
, and .always()
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.
// Assign handlers immediately after making the request,