Appendix G

AJAX Methods

Method Description Return Value
AJAX Requests
$.ajax([options])$.ajax(url[, options]) Allows you to pass an object literal specifying various options in key, value pairs. For the complete list of options, see the “AJAX Options” table. This method is used by jQuery's other AJAX methods to make AJAX requests. You should use this method only if you require finer-grained control over an AJAX request than is possible with jQuery's other methods. jQuery XMLHttpRequest
ajaxComplete(function()) Attaches a function to be executed when an AJAX request is completed. jQuery
ajaxError(function()) Attaches a function that is executed when an error occurs. jQuery
$.ajaxPrefilter( [dataTypes], function()) The dataTypes argument is optional and should contain one or more space-separated dataTypes.The callback function argument sets default values for future AJAX requests. Its argument list is options, originalOptions, jqXHR. Undefined
ajaxSend(function()) Attaches a function to be executed before an AJAX request is sent. jQuery
$.ajaxSetup(options) Configures the default options for AJAX requests. The option argument is passed as an object literal, in key, value pairs. See the “AJAX Options” table. jQuery
ajaxStart(function()) Attaches a function to be executed when the first AJAX request begins (if not already active). jQuery
ajaxStop(function()) Attaches a function to be executed when all AJAX requests have completed. jQuery
ajaxSuccess(function() ...

Get Web Development with jQuery now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.