diff options
Diffstat (limited to 'src/callbacks.js')
-rw-r--r-- | src/callbacks.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/callbacks.js b/src/callbacks.js index a6c504c79..bf51ad549 100644 --- a/src/callbacks.js +++ b/src/callbacks.js @@ -119,8 +119,8 @@ jQuery.Callbacks = function( options ) { // Remove a callback from the list remove: function() { if ( list ) { - jQuery.each( arguments, function( index, arg ) { - if ( ( index = jQuery.inArray( arg, list ) ) > -1 ) { + jQuery.each( arguments, function( _, arg, index ) { + while( ( index = jQuery.inArray( arg, list, index || 0 ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( firing ) { |