Make sure that forms and selects are added to a jQuery set correctly. Fixes #6912.
This commit is contained in:
parent
a9b81d759a
commit
728a70c036
2 changed files with 4 additions and 3 deletions
|
@ -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] ) ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue