Skip to content
Permalink
Browse files

Fixed issue with .add()ing individual elements - and with .add()ing f…

…orm elements (since they report a .length.
  • Loading branch information
jeresig committed Jan 20, 2007
1 parent 27c08b6 commit 7b3ab69fcfd5a53d7084bbe4b19a7f3e58d8564d
Showing with 4 additions and 1 deletion.
  1. +4 −1 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] )
);
},

0 comments on commit 7b3ab69

Please sign in to comment.
You can’t perform that action at this time.