Exploring additional options
The Ajax toolbox provided by jQuery is stocked well. We've covered several of the available options, but we've just scratched the surface. While there are too many variants to cover here, we will give an overview of some of the more prominent ways to customize Ajax communications.
The low-level Ajax method
We have seen several methods that all initiate Ajax transactions. Internally, jQuery maps each of these methods onto variants of the $.ajax()
global function. Rather than presuming one particular type of Ajax activity, this function accepts an object containing options that can be used to customize its behavior.
Our first example, Listing 6.1, loaded an HTML snippet using $('#dictionary').load('a.html')
. This action ...
Get Learning jQuery - Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.