<pclass="arguement"><strong>url</strong>A string containing the URL to which the request is sent.</p>
<pclass="arguement"><strong>data</strong>A map or string that is sent to the server with the request.</p>
<pclass="arguement"><strong>callback(data, textStatus, XMLHttpRequest)</strong>A callback function that is executed if the request succeeds.</p>
<pclass="arguement"><strong>dataType</strong>The type of data expected from the server.</p>
</li></ul>
<divclass="longdesc">
<p>This is a shorthand Ajax function, which is equivalent to:</p>
<pre>$.ajax({
url: <em>url</em>,
data: <em>data</em>,
success: <em>success</em>,
dataType: <em>dataType</em>
});
</pre>
<p>The <code>success</code> callback function is passed the returned data, which will be an XML root element, text string, JavaScript file, or JSON object, depending on the MIME type of the response. It is also passed the text status of the response. </p>
<p>As of jQuery 1.4, the <code>success</code> callback function is also passed the XMLHttpRequest object.</p>
<p>Most implementations will specify a success handler:</p>
<pre>$.get('ajax/test.html', function(data) {
$('.result').html(data);
alert('Load was performed.');
});
</pre>
<p>This example fetches the requested HTML snippet and inserts it on the page.</p>
</div>
<h3>Examples:</h3>
<divid="entry-examples"class="entry-examples">
<divid="example-0">
<h4>Example: <spanclass="desc">Request the test.php page, but ignore the return results.</span>
<h4>Example: <spanclass="desc">Alert out the results from requesting test.cgi with an additional payload of data (HTML or XML, depending on what was returned).</span>