X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax%2Fajax.js;h=9c94e13d38f8c6e0f9c2c8da7aacd6e65100a248;hb=a87ecc44b6b4374ad2ebe10e033d45daab9e1369;hp=66519036dace5c8d33059b777f380aaffd31ad00;hpb=ed5bda3020bd418ad8edb477ad2b1fd8b313cc04;p=jquery.git diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 6651903..9c94e13 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -55,7 +55,7 @@ jQuery.fn.extend({ // If the second parameter was provided if ( params ) // If it's a function - if ( jQuery.isFunction( params.constructor ) ) { + if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = null; @@ -77,7 +77,7 @@ jQuery.fn.extend({ complete: function(res, status){ if ( status == "success" || !ifModified && status == "notmodified" ) // Inject the HTML into all the matched elements - self.html(res.responseText) + self.attr("innerHTML", res.responseText) // Execute all the scripts inside of the newly-injected HTML .evalScripts() // Execute callback @@ -132,7 +132,7 @@ jQuery.fn.extend({ }); // If IE is used, create a wrapper for the XMLHttpRequest object -if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" ) +if ( !window.XMLHttpRequest ) XMLHttpRequest = function(){ return new ActiveXObject("Microsoft.XMLHTTP"); }; @@ -223,7 +223,7 @@ if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" ) */ /** - * Attach a function to be executed before an AJAX request is send. + * Attach a function to be executed before an AJAX request is sent. * * The XMLHttpRequest and settings used for that request are passed * as arguments to the callback. @@ -231,7 +231,7 @@ if ( jQuery.browser.msie && typeof XMLHttpRequest == "undefined" ) * @example $("#msg").ajaxSend(function(request, settings){ * $(this).append("