]> source.dussan.org Git - jquery.git/commitdiff
Changed $.sub internals to match sub naming, added some more spacing in some areas... 223/head
authorTimmy Willison <tim.willison@thisismedium.com>
Mon, 7 Feb 2011 00:34:57 +0000 (19:34 -0500)
committerTimmy Willison <tim.willison@thisismedium.com>
Mon, 7 Feb 2011 00:34:57 +0000 (19:34 -0500)
src/core.js
src/css.js
src/event.js

index 2e63472361b150b3e2abcce9111ca1eb65b0eb48..1bc4c1cfb805c70900f1939f7c185b2b88397eba 100644 (file)
@@ -441,7 +441,7 @@ jQuery.extend({
                } else if ( document.attachEvent ) {
                        // ensure firing before onload,
                        // maybe late but safe also for iframes
-                       document.attachEvent("onreadystatechange", DOMContentLoaded);
+                       document.attachEvent( "onreadystatechange", DOMContentLoaded );
 
                        // A fallback to window.onload, that will always work
                        window.attachEvent( "onload", jQuery.ready );
@@ -598,7 +598,7 @@ jQuery.extend({
        each: function( object, callback, args ) {
                var name, i = 0,
                        length = object.length,
-                       isObj = length === undefined || jQuery.isFunction(object);
+                       isObj = length === undefined || jQuery.isFunction( object );
 
                if ( args ) {
                        if ( isObj ) {
@@ -625,7 +625,7 @@ jQuery.extend({
                                }
                        } else {
                                for ( var value = object[0];
-                                       i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
+                                       i < length && callback.call( value, i, value ) !== false; value = object[ ++i ] ) {}
                        }
                }
 
@@ -656,7 +656,7 @@ jQuery.extend({
                        // The extra typeof function check is to prevent crashes
                        // in Safari 2 (See: #3039)
                        // 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 ) ) {
                                push.call( ret, array );
@@ -982,24 +982,24 @@ jQuery.extend({
        },
 
        sub: function() {
-               function jQuerySubclass( selector, context ) {
-                       return new jQuerySubclass.fn.init( selector, context );
+               function jQuerySub( selector, context ) {
+                       return new jQuerySub.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) ) {
-                               context = jQuerySubclass(context);
+               jQuery.extend( true, jQuerySub, this );
+               jQuerySub.superclass = this;
+               jQuerySub.fn = jQuerySub.prototype = this();
+               jQuerySub.fn.constructor = jQuerySub;
+               jQuerySub.sub = this.sub;
+               jQuerySub.fn.init = function init( selector, context ) {
+                       if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+                               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;
-               var rootjQuerySubclass = jQuerySubclass(document);
-               return jQuerySubclass;
+               jQuerySub.fn.init.prototype = jQuerySub.fn;
+               var rootjQuerySub = jQuerySub(document);
+               return jQuerySub;
        },
 
        browser: {}
index 19c6342d22b853fd087becaec4b373bbb5b16eaa..968188d6eff014aa22e4fdb8da024812228d1da3 100644 (file)
@@ -215,8 +215,8 @@ if ( !jQuery.support.opacity ) {
        jQuery.cssHooks.opacity = {
                get: function( elem, computed ) {
                        // IE uses filters for opacity
-                       return ropacity.test((computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "") ?
-                               (parseFloat(RegExp.$1) / 100) + "" :
+                       return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+                               ( parseFloat( RegExp.$1 ) / 100 ) + "" :
                                computed ? "1" : "";
                },
 
@@ -228,13 +228,13 @@ if ( !jQuery.support.opacity ) {
                        style.zoom = 1;
 
                        // Set the alpha filter to set the opacity
-                       var opacity = jQuery.isNaN(value) ?
-                               "" :
-                               "alpha(opacity=" + value * 100 + ")",
+                       var opacity = jQuery.isNaN( value ) ?
+                                       "" :
+                                       "alpha(opacity=" + value * 100 + ")",
                                filter = style.filter || "";
 
-                       style.filter = ralpha.test(filter) ?
-                               filter.replace(ralpha, opacity) :
+                       style.filter = ralpha.test( filter ) ?
+                               filter.replace( ralpha, opacity ) :
                                style.filter + ' ' + opacity;
                }
        };
index 2d53562ad99a09331ba62f38465ace89e645dbb3..01b05149a95d16c9059686df9f175fbfbce51641 100644 (file)
@@ -294,11 +294,9 @@ jQuery.event = {
                }
        },
 
-       // bubbling is internal
-       trigger: function( event, data, elem /*, bubbling */ ) {
+       trigger: function( event, data, elem, bubbling /* For Internal Use Only */ ) {
                // Event object or event type
-               var type = event.type || event,
-                       bubbling = arguments[3];
+               var type = event.type || event;
 
                if ( !bubbling ) {
                        event = typeof event === "object" ?