aboutsummaryrefslogtreecommitdiffstats
path: root/src/traversing.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-04-17 10:51:24 -0700
committerJohn Resig <jeresig@gmail.com>2011-04-17 10:51:24 -0700
commit728a70c036dfcdc0c45c5c60c08aeade786ce195 (patch)
tree7b1224d85c42b98b7adb7877ffe786bdbc9491e3 /src/traversing.js
parenta9b81d759af3a4574a42ca1de93be1247f7953a2 (diff)
downloadjquery-728a70c036dfcdc0c45c5c60c08aeade786ce195.tar.gz
jquery-728a70c036dfcdc0c45c5c60c08aeade786ce195.zip
Make sure that forms and selects are added to a jQuery set correctly. Fixes #6912.
Diffstat (limited to 'src/traversing.js')
-rw-r--r--src/traversing.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/traversing.js b/src/traversing.js
index e0f40151d..8c4b4ef83 100644
--- a/src/traversing.js
+++ b/src/traversing.js
@@ -160,7 +160,7 @@ jQuery.fn.extend({
add: function( selector, context ) {
var set = typeof selector === "string" ?
jQuery( selector, context ) :
- jQuery.makeArray( selector ),
+ jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
all = jQuery.merge( this.get(), set );
return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?