Load JSON data using an HTTP GET request.
As of jQuery 1.2, you can load JSON data located on another domain if you specify a JSONP callback, which can be done like so: "myurl?callback=?". jQuery automatically replaces the ? with the correct method name to call, calling your specified callback. This callback parameter may vary depending on API, for instance Yahoo Pipes requires "_callback=?"
Arguments:
| url | String | |
|---|---|---|
| The URL of the page to load. | ||
| data (Optional) | Map | |
| Key/value pairs that will be sent to the server. | ||
| callback (Optional) | Function | |
A function to be executed whenever the data is loaded successfully.
function (data, textStatus) {
// data will be a jsonObj
// textStatus will be one of the following values:
// "timeout","error","notmodified","success","parsererror"
this; // the options for this ajax request
}
| ||
