Commit c9c02428 authored by Ariel Flesler's avatar Ariel Flesler

jquery ajax: misc optimization for $.fn.load().

parent db076b06
...@@ -12,8 +12,6 @@ jQuery.fn.extend({ ...@@ -12,8 +12,6 @@ jQuery.fn.extend({
url = url.slice(0, off); url = url.slice(0, off);
} }
callback = callback || function(){};
// Default to a GET request // Default to a GET request
var type = "GET"; var type = "GET";
...@@ -56,7 +54,8 @@ jQuery.fn.extend({ ...@@ -56,7 +54,8 @@ jQuery.fn.extend({
// If not, just inject the full result // If not, just inject the full result
res.responseText ); res.responseText );
self.each( callback, [res.responseText, status, res] ); if( callback )
self.each( callback, [res.responseText, status, res] );
} }
}); });
return this; return this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment