diff options
author | Ariel Flesler <aflesler@gmail.com> | 2008-08-11 01:35:23 +0000 |
---|---|---|
committer | Ariel Flesler <aflesler@gmail.com> | 2008-08-11 01:35:23 +0000 |
commit | c9c024280abd20b4eef4a2dc280fa7f1d7be02f9 (patch) | |
tree | 0987c9f41a63c6f95e0862eee8959f351709d199 /src/ajax.js | |
parent | db076b06f5e01a9d544cc0a505e52debf730f179 (diff) | |
download | jquery-c9c024280abd20b4eef4a2dc280fa7f1d7be02f9.tar.gz jquery-c9c024280abd20b4eef4a2dc280fa7f1d7be02f9.zip |
jquery ajax: misc optimization for $.fn.load().
Diffstat (limited to 'src/ajax.js')
-rw-r--r-- | src/ajax.js | 5 |
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; |