We can retrieve information from the server without requiring a page refresh by calling one of these Ajax methods. Ajax methods are discussed in detail in Chapter 6, Sending Data with Ajax.
Ajax methods
Issuing requests
Ajax method |
Description |
$.ajax([url], options) |
Makes an Ajax request using the provided set of options. This is a low-level method that is often called via other convenience methods. |
.load(url, [data], [callback]) |
Makes an Ajax request to url and places the response into the matched elements. |
$.get(url, [data], [callback], [returnType]) |
Makes an Ajax request to url using the GET method. |
$.getJSON(url, [data], [callback]) |
Makes an Ajax request to url, interpreting the response as a JSON data structure. |
$.getScript... |