<pclass="arguement"><strong>options</strong>A set of key/value pairs that configure the default Ajax request. All options are optional. </p>
</li></ul>
<divclass="longdesc">
<p>For details on the settings available for <code>$.ajaxSetup()</code>, see <code><ahref="/jQuery.ajax">$.ajax()</a></code>. </p>
<p>All subsequent Ajax calls using any function will use the new settings, unless overridden by the individual calls, until the next invocation of <code>$.ajaxSetup()</code>.</p>
<p>For example, we could set a default for the URL parameter before pinging the server repeatedly:</p>
<pre>$.ajaxSetup({
url: 'ping.php',
});</pre>
<p>Now each time an Ajax request is made, this URL will be used automatically:</p>
<pre>
$.ajax({
data: {'name': 'Tim'},
});</pre>
<blockquote><p>Note: Global callback functions should be set with their respective global Ajax event handler methods-<code><ahref="/ajaxStart">.ajaxStart()</a></code>, <code><ahref="/ajaxStop">.ajaxStop()</a></code>, <code><ahref="/ajaxComplete">.ajaxComplete()</a></code>, <code><ahref="/ajaxError">.ajaxError()</a></code>, <code><ahref="/ajaxSuccess">.ajaxSuccess()</a></code>, <code><ahref="/ajaxSend">.ajaxSend()</a></code>-rather than within the <code>settings</code> object for <code>$.ajaxSetup()</code>.</p></blockquote>
<h4><spanclass="desc">Sets the defaults for Ajax requests to the url "/xmlhttp/", disables global handlers and uses POST instead of GET. The following Ajax requests then sends some data without having to set anything else.</span></h4>