diff options
Diffstat (limited to 'src/ajax/load.js')
-rw-r--r-- | src/ajax/load.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ajax/load.js b/src/ajax/load.js index 9d868a5dd..d9c4550fb 100644 --- a/src/ajax/load.js +++ b/src/ajax/load.js @@ -66,7 +66,10 @@ jQuery.fn.load = function( url, params, callback ) { // Otherwise use the full result responseText ); - }).complete( callback && function( jqXHR, status ) { + // If the request succeeds, this function gets "data", "status", "jqXHR" + // but they are ignored because response was set above. + // If it fails, this function gets "jqXHR", "status", "error" + }).always( callback && function( jqXHR, status ) { self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); }); } |