X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=src%2Fcore.js;h=2e0ece1b3884ae0b88a732fed91394319cfc2fae;hp=422b68876640216555821acd99f25e7e098165db;hb=e00f74c43bf58132be01c6417c6126a5bc085899;hpb=7f95a730e50260c60e7d3ee4fa53cbe29258e6b6 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;