git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Generic jQuery.merge and safer jQuery.makeArray(nodeList).
[jquery.git]
/
src
/
ajax.js
diff --git
a/src/ajax.js
b/src/ajax.js
index
a9f47dd
..
697365a
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-15,6
+15,10
@@
jQuery.fn.extend({
load: function( url, params, callback ) {
if ( typeof url !== "string" ) {
return this._load( url );
load: function( url, params, callback ) {
if ( typeof url !== "string" ) {
return this._load( url );
+
+ // Don't do a request if no elements are being requested
+ } else if ( !this.length ) {
+ return this;
}
var off = url.indexOf(" ");
}
var off = url.indexOf(" ");
@@
-469,7
+473,7
@@
jQuery.extend({
function success(){
// If a local callback was specified, fire it and pass it the data
if ( s.success ) {
function success(){
// If a local callback was specified, fire it and pass it the data
if ( s.success ) {
- s.success.call( callbackContext, data, status );
+ s.success.call( callbackContext, data, status, xhr );
}
// Fire the global callback
}
// Fire the global callback