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.shake.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.shake.js')
-rw-r--r-- | ui/jquery.effects.shake.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/jquery.effects.shake.js b/ui/jquery.effects.shake.js index cd26dc5af..550329ca4 100644 --- a/ui/jquery.effects.shake.js +++ b/ui/jquery.effects.shake.js @@ -54,20 +54,21 @@ $.effects.effect.shake = function( o ) { }; el .animate( animation1, speed, o.easing ) - .animate( animation, speed / 2, o.easing, function() { + .animate( animation, speed / 2, o.easing ) + .queue( function( next ) { if ( mode === "hide" ) { el.hide(); } - // Last shake $.effects.restore( el, props ); $.effects.removeWrapper( el ); $.isFunction( o.complete ) && o.complete.apply( this, arguments ); + next(); }); // inject all the animations we just queued to be first in line (after "inprogress") if ( queuelen > 1) { queue.splice.apply( queue, - [ 1, 0 ].concat( queue.splice( queuelen, anims ) ) ); + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); } el.dequeue(); }); |