jquery ajax: misc optimization for $.fn.load().
This commit is contained in:
parent
db076b06f5
commit
c9c024280a
|
@ -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,6 +54,7 @@ jQuery.fn.extend({
|
||||||
// If not, just inject the full result
|
// If not, just inject the full result
|
||||||
res.responseText );
|
res.responseText );
|
||||||
|
|
||||||
|
if( callback )
|
||||||
self.each( callback, [res.responseText, status, res] );
|
self.each( callback, [res.responseText, status, res] );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue