git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Attach data directly to plain objects, no reason to use the central jQuery.cache...
[jquery.git]
/
src
/
ajax.js
diff --git
a/src/ajax.js
b/src/ajax.js
index
3c19ad6
..
08fa08b
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-6,15
+6,15
@@
var jsc = now(),
rquery = /\?/,
rts = /(\?|&)_=.*?(&|$)/,
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
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 ) {
load: function( url, params, callback ) {
- if ( typeof url !== "string" ) {
- return this._load( url );
+ if ( typeof url !== "string" && _load ) {
+ return _load.apply( this, arguments );
// Don't do a request if no elements are being requested
} else if ( !this.length ) {
// Don't do a request if no elements are being requested
} else if ( !this.length ) {