Merge branch 'Sub_Naming' of https://github.com/timmywil/jquery into timmywil-Sub_Naming

Conflicts:
	src/core.js
	src/css.js
	src/event.js
This commit is contained in:
John Resig 2011-04-12 16:05:40 -04:00
commit 978c065555
3 changed files with 23 additions and 23 deletions

View file

@ -436,7 +436,7 @@ jQuery.extend({
} else if ( document.attachEvent ) { } else if ( document.attachEvent ) {
// ensure firing before onload, // ensure firing before onload,
// maybe late but safe also for iframes // maybe late but safe also for iframes
document.attachEvent("onreadystatechange", DOMContentLoaded); document.attachEvent( "onreadystatechange", DOMContentLoaded );
// A fallback to window.onload, that will always work // A fallback to window.onload, that will always work
window.attachEvent( "onload", jQuery.ready ); window.attachEvent( "onload", jQuery.ready );
@ -587,7 +587,7 @@ jQuery.extend({
each: function( object, callback, args ) { each: function( object, callback, args ) {
var name, i = 0, var name, i = 0,
length = object.length, length = object.length,
isObj = length === undefined || jQuery.isFunction(object); isObj = length === undefined || jQuery.isFunction( object );
if ( args ) { if ( args ) {
if ( isObj ) { if ( isObj ) {
@ -648,7 +648,7 @@ jQuery.extend({
// The extra typeof function check is to prevent crashes // The extra typeof function check is to prevent crashes
// in Safari 2 (See: #3039) // in Safari 2 (See: #3039)
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
var type = jQuery.type(array); var type = jQuery.type( array );
if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
push.call( ret, array ); push.call( ret, array );
@ -844,24 +844,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: {}

View file

@ -231,8 +231,8 @@ if ( !jQuery.support.opacity ) {
jQuery.cssHooks.opacity = { jQuery.cssHooks.opacity = {
get: function( elem, computed ) { get: function( elem, computed ) {
// IE uses filters for opacity // IE uses filters for opacity
return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ? return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
(parseFloat(RegExp.$1) / 100) + "" : ( parseFloat( RegExp.$1 ) / 100 ) + "" :
computed ? "1" : ""; computed ? "1" : "";
}, },
@ -245,13 +245,13 @@ if ( !jQuery.support.opacity ) {
style.zoom = 1; style.zoom = 1;
// Set the alpha filter to set the opacity // Set the alpha filter to set the opacity
var opacity = jQuery.isNaN(value) ? var opacity = jQuery.isNaN( value ) ?
"" : "" :
"alpha(opacity=" + value * 100 + ")", "alpha(opacity=" + value * 100 + ")",
filter = currentStyle && currentStyle.filter || style.filter || ""; filter = currentStyle && currentStyle.filter || style.filter || "";
style.filter = ralpha.test(filter) ? style.filter = ralpha.test( filter ) ?
filter.replace(ralpha, opacity) : filter.replace( ralpha, opacity ) :
filter + " " + opacity; filter + " " + opacity;
} }
}; };

View file

@ -275,7 +275,7 @@ jQuery.event = {
"changeData": true "changeData": true
}, },
trigger: function( event, data, elem ) { trigger: function( event, data, elem, bubbling /* For Internal Use Only */ ) {
// Event object or event type // Event object or event type
var type = event.type || event, var type = event.type || event,
namespaces = [], namespaces = [],