Skip to content
Permalink
Browse files

.animate() Callbacks should fire in correct order (fix #9100 + unit t…

…est)
  • Loading branch information...
louisremi
louisremi committed May 9, 2011
1 parent b5772da commit 076c347605c752821dfb6457044df4ba87b601c1
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/effects.js
@@ -253,7 +253,6 @@ jQuery.fn.extend({
if ( !gotoEnd ) {
jQuery._unmark( true, this );
}
// go in reverse order so anything added to the queue during the loop is ignored
while ( i-- ) {
if ( timers[i].elem === this ) {
if (gotoEnd) {
@@ -517,11 +516,9 @@ jQuery.fx.prototype = {

jQuery.extend( jQuery.fx, {
tick: function() {
var timers = jQuery.timers,
i = timers.length;
while ( i-- ) {
for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) {
if ( !timers[i]() ) {
timers.splice(i, 1);
timers.splice(i--, 1);
}
}

0 comments on commit 076c347

Please sign in to comment.
You can’t perform that action at this time.