git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27c08b6
)
Fixed issue with .add()ing individual elements - and with .add()ing form elements...
author
John Resig
<jeresig@gmail.com>
Sat, 20 Jan 2007 04:16:25 +0000
(
04:16
+0000)
committer
John Resig
<jeresig@gmail.com>
Sat, 20 Jan 2007 04:16:25 +0000
(
04:16
+0000)
src/jquery/jquery.js
patch
|
blob
|
history
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
4e82608
..
38c8da3
100644
(file)
--- 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] )
);
},