X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax%2Fajax.js;fp=src%2Fajax%2Fajax.js;h=0000000000000000000000000000000000000000;hb=b4e23b5af0820a66c2e275051f613f3df9a4444d;hp=ffe30481d37e956024115124454c52801b82f9eb;hpb=13b66c8ba9618242df2c1cc352a2b1d879c36188;p=jquery.git diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js deleted file mode 100644 index ffe3048..0000000 --- a/src/ajax/ajax.js +++ /dev/null @@ -1,462 +0,0 @@ -jQuery.fn.extend({ - load: function( url, params, callback ) { - if ( jQuery.isFunction( url ) ) - return this.bind("load", url); - - var off = url.indexOf(" "); - if ( off >= 0 ) { - var selector = url.slice(off, url.length); - url = url.slice(0, off); - } - - callback = callback || function(){}; - - // Default to a GET request - var type = "GET"; - - // If the second parameter was provided - if ( params ) - // If it's a function - if ( jQuery.isFunction( params ) ) { - // We assume that it's the callback - callback = params; - params = null; - - // Otherwise, build a param string - } else { - params = jQuery.param( params ); - type = "POST"; - } - - var self = this; - - // Request the remote document - jQuery.ajax({ - url: url, - type: type, - data: params, - complete: function(res, status){ - // If successful, inject the HTML into all the matched elements - if ( status == "success" || status == "notmodified" ) - // See if a selector was specified - self.html( selector ? - // Create a dummy div to hold the results - jQuery("
") - // inject the contents of the document in, removing the scripts - // to avoid any 'Permission Denied' errors in IE - .append(res.responseText.replace(/