O'Reilly logo

Learning jQuery Third Edition by Karl Swedberg, Jonathan Chaffer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Ajax methods

We can retrieve information from the server without requiring a page refresh by calling one of the following Ajax methods. Ajax methods are discussed in detail in Chapter 6.

Issuing requests

Ajax Method

Description

$.ajax(options)

Make an Ajax request using the provided set of options; this is a low-level method that is usually called through other convenience methods

.load(url, [data], [callback])

Make an Ajax request to url, and place the response into the matched elements

$.get(url, [data], [callback], [returnType])

Make an Ajax request to url using the GET method

$.getJSON(url, [data], [callback])

Make an Ajax request to url, interpreting the response as a JSON data structure

$.getScript(url, [callback]) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required