No reason to expose the temporary _load method.
This commit is contained in:
parent
d3d497f900
commit
639f4931b0
10
src/ajax.js
10
src/ajax.js
|
@ -6,15 +6,15 @@ var jsc = now(),
|
||||||
rquery = /\?/,
|
rquery = /\?/,
|
||||||
rts = /(\?|&)_=.*?(&|$)/,
|
rts = /(\?|&)_=.*?(&|$)/,
|
||||||
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
|
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
|
||||||
r20 = /%20/g;
|
r20 = /%20/g,
|
||||||
|
|
||||||
|
// Keep a copy of the old load method
|
||||||
|
_load = jQuery.fn.load;
|
||||||
|
|
||||||
jQuery.fn.extend({
|
jQuery.fn.extend({
|
||||||
// Keep a copy of the old load
|
|
||||||
_load: jQuery.fn.load,
|
|
||||||
|
|
||||||
load: function( url, params, callback ) {
|
load: function( url, params, callback ) {
|
||||||
if ( typeof url !== "string" ) {
|
if ( typeof url !== "string" ) {
|
||||||
return this._load( url );
|
return _load.call( this, url );
|
||||||
|
|
||||||
// Don't do a request if no elements are being requested
|
// Don't do a request if no elements are being requested
|
||||||
} else if ( !this.length ) {
|
} else if ( !this.length ) {
|
||||||
|
|
Loading…
Reference in a new issue