Web Development with jQuery®

(Elliott) #1

(^534) ❘ APPENDIX G AJAX METHODS
bapp07.indd 02/17/2015 Page 534
ajaxSend(function()) Attaches a function to be exe-
cuted before an AJAX request is
sent.
jQuery
$.ajaxSetup(options) Confi gures the default options for
AJAX requests. The option argu-
ment is passed as an object literal,
in key, value pairs. See the “AJAX
Options” table.
jQuery
ajaxStart(function()) Attaches a function to be exe-
cuted when the fi rst AJAX request
begins (if not already active).
jQuery
ajaxStop(function()) Attaches a function to be exe-
cuted when all AJAX requests
have completed.
jQuery
ajaxSuccess(function()) Attaches a function to be exe-
cuted when an AJAX request has
completed successfully.
jQuery
$.ajaxTransport() Creates the AJAX transport
object used internally to issue
AJAX requests. You should use
this method only if you require
fi ner-grained control over an
AJAX request than is possible with
jQuery’s other methods.
undefi ned
$.get(
url
[, data]
[, onSuccessFunction]
[, dataType]
)
Initiates and sends to the server
an HTTP GET request.
jQuery
XMLHttpRequest
$.getJSON(
url
[, data]
[, function]
)
Initiates and sends an HTTP GET
request, in which the response will
be JSON-formatted data.
jQuery
XMLHttpRequest
$.getScript(url,
[function])
Loads and executes a new
JavaScript fi le via the GET method
asynchronously.
jQuery
XMLHttpRequest
(continued)
http://www.it-ebooks.info

Free download pdf