By default, use document root rather than current selection's context when add()ing elements. Fixes #7853.

This commit is contained in:
Dave Methvin 2010-12-28 21:07:04 -05:00
parent 5fd21fc02b
commit c27d5ca6f5
2 changed files with 9 additions and 8 deletions

View file

@ -134,7 +134,7 @@ jQuery.fn.extend({
add: function( selector, context ) {
var set = typeof selector === "string" ?
jQuery( selector, context || this.context ) :
jQuery( selector, context ) :
jQuery.makeArray( selector ),
all = jQuery.merge( this.get(), set );