aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authorAriel Flesler <aflesler@gmail.com>2008-08-11 01:35:23 +0000
committerAriel Flesler <aflesler@gmail.com>2008-08-11 01:35:23 +0000
commitc9c024280abd20b4eef4a2dc280fa7f1d7be02f9 (patch)
tree0987c9f41a63c6f95e0862eee8959f351709d199 /src/ajax.js
parentdb076b06f5e01a9d544cc0a505e52debf730f179 (diff)
downloadjquery-c9c024280abd20b4eef4a2dc280fa7f1d7be02f9.tar.gz
jquery-c9c024280abd20b4eef4a2dc280fa7f1d7be02f9.zip
jquery ajax: misc optimization for $.fn.load().
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 885c8193e..bda79b50a 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -12,8 +12,6 @@ jQuery.fn.extend({
url = url.slice(0, off);
}
- callback = callback || function(){};
-
// Default to a GET request
var type = "GET";
@@ -56,7 +54,8 @@ jQuery.fn.extend({
// If not, just inject the full result
res.responseText );
- self.each( callback, [res.responseText, status, res] );
+ if( callback )
+ self.each( callback, [res.responseText, status, res] );
}
});
return this;