Skip to content
Permalink
Browse files

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

  • Loading branch information
flesler committed Aug 11, 2008
1 parent db076b0 commit c9c024280abd20b4eef4a2dc280fa7f1d7be02f9
Showing with 2 additions and 3 deletions.
  1. +2 −3 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;

0 comments on commit c9c0242

Please sign in to comment.
You can’t perform that action at this time.