X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax.js;h=a9f47ddb27300831c3c99f23d1d8f6c1785b7a74;hb=5cb1163469fb2c9cd80712cd5481b29055821022;hp=858ac4b7a2b5923ad0df4c4e3aff02c5b762b709;hpb=67089eedf6f84acd9c16ea2a6dadadf7b13a7c84;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 858ac4b..a9f47dd 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -102,7 +102,7 @@ jQuery.fn.extend({ }); // Attach a bunch of functions for handling common AJAX events -jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){ +jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function(i,o){ jQuery.fn[o] = function(f){ return this.bind(o, f); }; @@ -194,7 +194,7 @@ jQuery.extend({ ajax: function( s ) { // Extend the settings, but re-extend 's' so that it can be // checked again later (in the test suite, specifically) - s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s)); + s = jQuery.extend(true, {}, jQuery.ajaxSettings, s); var jsonp, status, data, callbackContext = s.context || window, @@ -457,6 +457,8 @@ jQuery.extend({ xhr.send( type === "POST" || type === "PUT" ? s.data : null ); } catch(e) { jQuery.handleError(s, xhr, null, e); + // Fire the complete handlers + complete(); } // firefox 1.5 doesn't fire statechange for sync requests