aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2012-04-25 17:15:48 +0200
committerjaubourg <j@ubourg.net>2012-04-25 17:15:48 +0200
commit42dbc86573a1172157def6fc417f33b69d00c2a5 (patch)
treef5c8c296c4d8790de3a962d8c23ee1b24958a0b7 /src
parent245f5a244e024cb99ac84be86f86b88654a909c9 (diff)
downloadjquery-42dbc86573a1172157def6fc417f33b69d00c2a5.tar.gz
jquery-42dbc86573a1172157def6fc417f33b69d00c2a5.zip
Use real declaration since that helps gzip: thanks @gibson042.
Diffstat (limited to 'src')
-rw-r--r--src/callbacks.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/callbacks.js b/src/callbacks.js
index bf51ad549..42f9315e9 100644
--- a/src/callbacks.js
+++ b/src/callbacks.js
@@ -93,7 +93,8 @@ jQuery.Callbacks = function( options ) {
// First, we save the current length
var start = list.length;
(function add( args ) {
- jQuery.each( args, function( type, arg ) {
+ jQuery.each( args, function( _, arg ) {
+ var type;
if ( ( type = jQuery.type(arg) ) === "array" ) {
// Inspect recursively
add( arg );
@@ -119,8 +120,9 @@ jQuery.Callbacks = function( options ) {
// Remove a callback from the list
remove: function() {
if ( list ) {
- jQuery.each( arguments, function( _, arg, index ) {
- while( ( index = jQuery.inArray( arg, list, index || 0 ) ) > -1 ) {
+ jQuery.each( arguments, function( _, arg ) {
+ var index = 0;
+ while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
list.splice( index, 1 );
// Handle firing indexes
if ( firing ) {