aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-04-12 16:05:40 -0400
committerJohn Resig <jeresig@gmail.com>2011-04-12 16:05:40 -0400
commit978c0655550ffbe32d977dbc997082e287c3a2b8 (patch)
treead219d7cc4850f8def53f4d7aaed841c345447b9 /src
parente7787cd09805583ff690d9c5e4b4c58a88393bf9 (diff)
parent82626799cacef94a1b35d0a0b4d284b38104704b (diff)
downloadjquery-978c0655550ffbe32d977dbc997082e287c3a2b8.tar.gz
jquery-978c0655550ffbe32d977dbc997082e287c3a2b8.zip
Merge branch 'Sub_Naming' of https://github.com/timmywil/jquery into timmywil-Sub_Naming
Conflicts: src/core.js src/css.js src/event.js
Diffstat (limited to 'src')
-rw-r--r--src/core.js36
-rw-r--r--src/css.js10
-rw-r--r--src/event.js2
3 files changed, 24 insertions, 24 deletions
diff --git a/src/core.js b/src/core.js
index fa15cffc0..87d5555be 100644
--- a/src/core.js
+++ b/src/core.js
@@ -436,7 +436,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 );
@@ -587,7 +587,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 ) {
@@ -648,7 +648,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 );
@@ -844,24 +844,24 @@ jQuery.extend({
},
sub: function() {
- 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) ) {
- context = jQuerySubclass(context);
+ function jQuerySub( selector, context ) {
+ return new jQuerySub.fn.init( selector, 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: {}
diff --git a/src/css.js b/src/css.js
index b2d3af655..c5c01ecac 100644
--- a/src/css.js
+++ b/src/css.js
@@ -231,8 +231,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" : "";
},
@@ -245,13 +245,13 @@ if ( !jQuery.support.opacity ) {
style.zoom = 1;
// Set the alpha filter to set the opacity
- var opacity = jQuery.isNaN(value) ?
+ var opacity = jQuery.isNaN( value ) ?
"" :
"alpha(opacity=" + value * 100 + ")",
filter = currentStyle && currentStyle.filter || style.filter || "";
- style.filter = ralpha.test(filter) ?
- filter.replace(ralpha, opacity) :
+ style.filter = ralpha.test( filter ) ?
+ filter.replace( ralpha, opacity ) :
filter + " " + opacity;
}
};
diff --git a/src/event.js b/src/event.js
index 275afdf93..d6b116d2e 100644
--- a/src/event.js
+++ b/src/event.js
@@ -275,7 +275,7 @@ jQuery.event = {
"changeData": true
},
- trigger: function( event, data, elem ) {
+ trigger: function( event, data, elem, bubbling /* For Internal Use Only */ ) {
// Event object or event type
var type = event.type || event,
namespaces = [],