diff --git a/src/core.js b/src/core.js index 29fc29bc4..9a506f31e 100644 --- a/src/core.js +++ b/src/core.js @@ -564,21 +564,21 @@ jQuery.extend({ }, // args is for internal usage only - each: function( object, callback, args ) { + each: function( obj, callback, args ) { var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction( object ); + length = obj.length, + isObj = length === undefined || jQuery.isFunction( obj ); if ( args ) { if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { + for ( name in obj ) { + if ( callback.apply( obj[ name ], args ) === false ) { break; } } } else { for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { + if ( callback.apply( obj[ i++ ], args ) === false ) { break; } } @@ -587,21 +587,21 @@ jQuery.extend({ // A special, fast, case for the most common use of each } else { if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + for ( name in obj ) { + if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) { break; } } } else { for ( ; i < length; ) { - if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { + if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) { break; } } } } - return object; + return obj; }, // Use native String.trim function wherever possible @@ -620,38 +620,38 @@ jQuery.extend({ }, // results is for internal usage only - makeArray: function( array, results ) { + makeArray: function( arr, results ) { var ret = results || []; - if ( array != null ) { + if ( arr != null ) { // The window, strings (and functions) also have 'length' // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type( array ); + var type = jQuery.type( arr ); - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - core_push.call( ret, array ); + if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) { + core_push.call( ret, arr ); } else { - jQuery.merge( ret, array ); + jQuery.merge( ret, arr ); } } return ret; }, - inArray: function( elem, array, i ) { + inArray: function( elem, arr, i ) { var len; - if ( array ) { + if ( arr ) { if ( core_indexOf ) { - return core_indexOf.call( array, elem, i ); + return core_indexOf.call( arr, elem, i ); } - len = array.length; + len = arr.length; i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; for ( ; i < len; i++ ) { // Skip accessing in sparse arrays - if ( i in array && array[ i ] === elem ) { + if ( i in arr && arr[ i ] === elem ) { return i; } } @@ -817,7 +817,7 @@ jQuery.extend({ } }); -jQuery.ready.promise = function( object ) { +jQuery.ready.promise = function( obj ) { if ( !readyList ) { readyList = jQuery.Deferred(); @@ -871,7 +871,7 @@ jQuery.ready.promise = function( object ) { } } } - return readyList.promise( object ); + return readyList.promise( obj ); }; // Populate the class2type map diff --git a/src/queue.js b/src/queue.js index e47f721b8..d49b3dd68 100644 --- a/src/queue.js +++ b/src/queue.js @@ -112,7 +112,7 @@ jQuery.fn.extend({ }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) - promise: function( type, object ) { + promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), @@ -125,7 +125,7 @@ jQuery.fn.extend({ }; if ( typeof type !== "string" ) { - object = type; + obj = type; type = undefined; } type = type || "fx"; @@ -137,6 +137,6 @@ jQuery.fn.extend({ } } resolve(); - return defer.promise( object ); + return defer.promise( obj ); } });