Skip to content

Commit 8ad0c60

Browse files
staabmkswedberg
authored andcommitted
.ajaxError(): parameter name in example -> . Closes jquery#439
1 parent 630f90b commit 8ad0c60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entries/ajaxError.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $( "button.trigger" ).on( "click", function() {
3636
<p><strong>As of jQuery 1.8, the <code>.ajaxError()</code> method should only be attached to <code>document</code>.</strong></p>
3737
<p>All <code>ajaxError</code> handlers are invoked, regardless of what Ajax request was completed. To differentiate between the requests, use the parameters passed to the handler. Each time an <code>ajaxError</code> handler is executed, it is passed the event object, the <code>jqXHR</code> object (prior to jQuery 1.5, the <code><abbr title="XMLHttpRequest">XHR</abbr></code> object), and the settings object that was used in the creation of the request. When an HTTP error occurs, the fourth argument (<code>thrownError</code>) receives the textual portion of the HTTP status, such as "Not Found" or "Internal Server Error." For example, to restrict the error callback to only handling events dealing with a particular URL:</p>
3838
<pre><code>
39-
$( document ).ajaxError(function( event, jqxhr, settings, exception ) {
39+
$( document ).ajaxError(function( event, jqxhr, settings, thrownError ) {
4040
if ( settings.url == "ajax/missing.html" ) {
4141
$( "div.log" ).text( "Triggered ajaxError handler." );
4242
}

0 commit comments

Comments
 (0)