Skip to content

Latest commit

 

History

History
95 lines (57 loc) · 2.66 KB

api-jquery.md

File metadata and controls

95 lines (57 loc) · 2.66 KB

[TOC]

jQuery

.text()

.filter()

.find()

.each()

.map()

.ajax()


The callback hooks provided by $.ajax() are as follows:

  1. beforeSend callback option is invoked; it receives the jqXHR object and the settings object as parameters.
  2. error callback option is invoked, if the request fails. It receives the jqXHR, 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".
  3. dataFilter callback option is invoked immediately upon successful receipt of response data. It receives the returned data and the value of dataType, and must return the (possibly altered) data to pass on to success.
  4. success callback option is invoked, if the request succeeds. It receives the returned data, a string containing the success code, and the jqXHR object.
  5. Promise callbacks.done(), .fail(), .always(), and .then() — are invoked, in the order they are registered.
  6. complete callback option fires, when the request finishes, whether in failure or success. It receives the jqXHR object, as well as a string containing the success or error code.

.ajaxComplete()

jQuery prototype (alias $.fn)

.jquery

.length / .size()

.selector

.context

.html()

.text()

.first()

.last()

.filter()

Miscellaneous

.find()

.children()

.contents()

.each()

.map()

  • [attribute]
  • [attribute=value]

  • [attribute~=value]
  • [attribute*=value]

  • [attribute|=value]
  • [attribute^=value]
  • [attribute$=value]
  • :first
  • :last
  • [attribute!=value]