diff options
author | gnarf <gnarf@gnarf.net> | 2011-05-10 16:25:08 -0500 |
---|---|---|
committer | gnarf <gnarf@gnarf.net> | 2011-05-10 16:25:08 -0500 |
commit | 783f134aaa333b9e8795c701d8fd741de387cb0e (patch) | |
tree | 9a944fb8d22c6e8bf9cddf37be3191c59c7c45a4 /ui/jquery.effects.pulsate.js | |
parent | 27a7deebf299e1673e8b452476be02e486bba2c6 (diff) | |
download | jquery-ui-783f134aaa333b9e8795c701d8fd741de387cb0e.tar.gz jquery-ui-783f134aaa333b9e8795c701d8fd741de387cb0e.zip |
effects: Updating bounce/pulsate/shake to fire callbacks before the next anim starts
Diffstat (limited to 'ui/jquery.effects.pulsate.js')
-rw-r--r-- | ui/jquery.effects.pulsate.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js index 54c5c10af..a0ddf51fd 100644 --- a/ui/jquery.effects.pulsate.js +++ b/ui/jquery.effects.pulsate.js @@ -43,19 +43,22 @@ $.effects.effect.pulsate = function( o ) { elem.animate({ opacity: animateTo - }, duration, o.easing, function() { + }, duration, o.easing); + + elem.queue( function( next ) { if ( hide ) { elem.hide(); } if ( o.complete ) { o.complete.apply( this ); } + next(); }); // We just queued up "anims" animations, we need to put them next in the queue if ( queuelen > 1) { queue.splice.apply( queue, - [ 1, 0 ].concat( queue.splice( queuelen, anims ) ) ); + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); } next(); }); |