Commit 357e2ae9 authored by John Resig's avatar John Resig

Added a check to make sure that a load request isn't done if the element...

Added a check to make sure that a load request isn't done if the element doesn't exist. Fixes #4235.
parent c2101245
......@@ -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(" ");
......
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