Fixed issue with .add()ing individual elements - and with .add()ing form elements...
[jquery.git] / src / jquery / jquery.js
index 4e82608..38c8da3 100644 (file)
@@ -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] )
                );
        },