diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jquery/jquery.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 4e82608f0..38c8da303 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -985,7 +985,10 @@ jQuery.fn = jQuery.prototype = { add: function(t) { return this.pushStack( jQuery.merge( this.get(), - typeof t == "string" ? jQuery(t).get() : t.length ? t : [t] ) + t.constructor == String ? + jQuery(t).get() : + t.length != undefined && !t.nodeName ? + t : [t] ) ); }, |