From: John Resig Date: Thu, 11 Feb 2010 06:23:13 +0000 (-0500) Subject: No reason to expose the temporary _load method. X-Git-Tag: 1.4.2~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=639f4931b0409a8eb83aaf89a03b6b52f674663e;p=jquery.git No reason to expose the temporary _load method. --- diff --git a/src/ajax.js b/src/ajax.js index 3c19ad6c7..7b15a1d80 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -6,15 +6,15 @@ var jsc = now(), rquery = /\?/, rts = /(\?|&)_=.*?(&|$)/, rurl = /^(\w+:)?\/\/([^\/?#]+)/, - r20 = /%20/g; + r20 = /%20/g, -jQuery.fn.extend({ - // Keep a copy of the old load - _load: jQuery.fn.load, + // Keep a copy of the old load method + _load = jQuery.fn.load; +jQuery.fn.extend({ load: function( url, params, callback ) { if ( typeof url !== "string" ) { - return this._load( url ); + return _load.call( this, url ); // Don't do a request if no elements are being requested } else if ( !this.length ) {