diff options
author | John Resig <jeresig@gmail.com> | 2011-04-17 10:51:24 -0700 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2011-04-17 10:51:24 -0700 |
commit | 728a70c036dfcdc0c45c5c60c08aeade786ce195 (patch) | |
tree | 7b1224d85c42b98b7adb7877ffe786bdbc9491e3 /src | |
parent | a9b81d759af3a4574a42ca1de93be1247f7953a2 (diff) | |
download | jquery-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')
-rw-r--r-- | src/traversing.js | 2 |
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] ) ? |