[TOC]
The callback hooks provided by $.ajax()
are as follows:
beforeSend
callback option is invoked; it receives thejqXHR
object and thesettings
object as parameters.error
callback 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".dataFilter
callback 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
.success
callback option is invoked, if the request succeeds. It receives the returned data, a string containing the success code, and thejqXHR
object.- Promise callbacks —
.done()
,.fail()
,.always()
, and.then()
— are invoked, in the order they are registered. complete
callback option fires, when the request finishes, whether in failure or success. It receives thejqXHR
object, 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]