X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=2e0ece1b3884ae0b88a732fed91394319cfc2fae;hb=91ca71daaab767f288f7173733f2bd907d8397a8;hp=422b68876640216555821acd99f25e7e098165db;hpb=ab1d9a8a2c296a2fa31b7d15146ce115c4057fad;p=jquery.git diff --git a/src/core.js b/src/core.js index 422b688..2e0ece1 100644 --- a/src/core.js +++ b/src/core.js @@ -961,14 +961,16 @@ jQuery.extend({ function jQuerySubclass( selector, context ) { return new jQuerySubclass.fn.init( selector, context ); } + jQuery.extend( true, jQuerySubclass, this ); jQuerySubclass.superclass = this; jQuerySubclass.fn = jQuerySubclass.prototype = this(); jQuerySubclass.fn.constructor = jQuerySubclass; jQuerySubclass.subclass = this.subclass; jQuerySubclass.fn.init = function init( selector, context ) { - if (context && context instanceof jQuery && !(context instanceof jQuerySubclass)){ + if ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) { context = jQuerySubclass(context); } + return jQuery.fn.init.call( this, selector, context, rootjQuerySubclass ); }; jQuerySubclass.fn.init.prototype = jQuerySubclass.fn;