Changed $.sub internals to match sub naming, added some more spacing in some areas for readability
This commit is contained in:
parent
d6fbbe1080
commit
82626799ca
3 changed files with 27 additions and 29 deletions
28
src/core.js
28
src/core.js
|
@ -982,24 +982,24 @@ jQuery.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
sub: function() {
|
sub: function() {
|
||||||
function jQuerySubclass( selector, context ) {
|
function jQuerySub( selector, context ) {
|
||||||
return new jQuerySubclass.fn.init( selector, context );
|
return new jQuerySub.fn.init( selector, context );
|
||||||
}
|
}
|
||||||
jQuery.extend( true, jQuerySubclass, this );
|
jQuery.extend( true, jQuerySub, this );
|
||||||
jQuerySubclass.superclass = this;
|
jQuerySub.superclass = this;
|
||||||
jQuerySubclass.fn = jQuerySubclass.prototype = this();
|
jQuerySub.fn = jQuerySub.prototype = this();
|
||||||
jQuerySubclass.fn.constructor = jQuerySubclass;
|
jQuerySub.fn.constructor = jQuerySub;
|
||||||
jQuerySubclass.subclass = this.subclass;
|
jQuerySub.sub = this.sub;
|
||||||
jQuerySubclass.fn.init = function init( selector, context ) {
|
jQuerySub.fn.init = function init( selector, context ) {
|
||||||
if ( context && context instanceof jQuery && !(context instanceof jQuerySubclass) ) {
|
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
|
||||||
context = jQuerySubclass(context);
|
context = jQuerySub( context );
|
||||||
}
|
}
|
||||||
|
|
||||||
return jQuery.fn.init.call( this, selector, context, rootjQuerySubclass );
|
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
||||||
};
|
};
|
||||||
jQuerySubclass.fn.init.prototype = jQuerySubclass.fn;
|
jQuerySub.fn.init.prototype = jQuerySub.fn;
|
||||||
var rootjQuerySubclass = jQuerySubclass(document);
|
var rootjQuerySub = jQuerySub(document);
|
||||||
return jQuerySubclass;
|
return jQuerySub;
|
||||||
},
|
},
|
||||||
|
|
||||||
browser: {}
|
browser: {}
|
||||||
|
|
|
@ -294,11 +294,9 @@ jQuery.event = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// bubbling is internal
|
trigger: function( event, data, elem, bubbling /* For Internal Use Only */ ) {
|
||||||
trigger: function( event, data, elem /*, bubbling */ ) {
|
|
||||||
// Event object or event type
|
// Event object or event type
|
||||||
var type = event.type || event,
|
var type = event.type || event;
|
||||||
bubbling = arguments[3];
|
|
||||||
|
|
||||||
if ( !bubbling ) {
|
if ( !bubbling ) {
|
||||||
event = typeof event === "object" ?
|
event = typeof event === "object" ?
|
||||||
|
|
Loading…
Add table
Reference in a new issue