X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fajax.js;h=353c824ff7db7a3bbfe765c66ff4290a27869f85;hb=1a94a46826188fc3ba63680ca62db164589c70c9;hp=858ac4b7a2b5923ad0df4c4e3aff02c5b762b709;hpb=67089eedf6f84acd9c16ea2a6dadadf7b13a7c84;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 858ac4b..353c824 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); }; @@ -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