mirror of
https://github.com/jquery/jquery.git
synced 2026-01-24 21:48:00 -05:00
Added a check to make sure that a load request isn't done if the element doesn't exist. Fixes #4235.
This commit is contained in:
@@ -15,6 +15,10 @@ jQuery.fn.extend({
|
||||
load: function( url, params, callback ) {
|
||||
if ( typeof url !== "string" ) {
|
||||
return this._load( url );
|
||||
|
||||
// Don't do a request if no elements are being requested
|
||||
} else if ( !this.length ) {
|
||||
return this;
|
||||
}
|
||||
|
||||
var off = url.indexOf(" ");
|
||||
|
||||
Reference in New Issue
Block a user