[TOC]
The callback hooks provided by $.ajax() are as follows:
beforeSendcallback option is invoked; it receives thejqXHRobject and thesettingsobject as parameters.errorcallback option is invoked, if the request fails. It receives thejqXHR, a string indicating the error type, and an exception object if applicable. Some built-in errors will provide a string as the exception object: "abort", "timeout", "No Transport".dataFiltercallback option is invoked immediately upon successful receipt of response data. It receives the returned data and the value ofdataType, and must return the (possibly altered) data to pass on tosuccess.successcallback option is invoked, if the request succeeds. It receives the returned data, a string containing the success code, and thejqXHRobject.- Promise callbacks —
.done(),.fail(),.always(), and.then()— are invoked, in the order they are registered. completecallback option fires, when the request finishes, whether in failure or success. It receives thejqXHRobject, as well as a string containing the success or error code.
- [attribute]
- [attribute=value]
- [attribute~=value]
- [attribute*=value]
- [attribute|=value]
- [attribute^=value]
- [attribute$=value]
- :first
- :last
- [attribute!=value]