aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.bounce.js
diff options
context:
space:
mode:
authorgnarf <gnarf@gnarf.net>2011-06-21 01:11:46 -0500
committergnarf <gnarf@gnarf.net>2011-06-21 01:18:19 -0500
commitab627e03a6a37cbf3291e9600f5482bd50991360 (patch)
treecda0933741895ef198be19813cb45168889ea78f /ui/jquery.effects.bounce.js
parent65a6c46e5568c43a9df9505e23da6a766814557e (diff)
downloadjquery-ui-ab627e03a6a37cbf3291e9600f5482bd50991360.tar.gz
jquery-ui-ab627e03a6a37cbf3291e9600f5482bd50991360.zip
Effects.*: DRY the complete callback execution into the 'done' callback passed into an effect
Diffstat (limited to 'ui/jquery.effects.bounce.js')
-rw-r--r--ui/jquery.effects.bounce.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/ui/jquery.effects.bounce.js b/ui/jquery.effects.bounce.js
index 38171c32e..41ee34f64 100644
--- a/ui/jquery.effects.bounce.js
+++ b/ui/jquery.effects.bounce.js
@@ -12,7 +12,7 @@
*/
(function( $, undefined ) {
-$.effects.effect.bounce = function( o, next ) {
+$.effects.effect.bounce = function( o, done ) {
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
@@ -91,16 +91,13 @@ $.effects.effect.bounce = function( o, next ) {
el.animate( upAnim, speed, easing );
}
- el.queue( function( next ) {
+ el.queue(function() {
if ( hide ) {
el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );
- if ( o.complete ) {
- o.complete.apply( el[ 0 ] );
- }
- next();
+ done();
});
// inject all the animations we just queued to be first in line (after "inprogress")
@@ -108,7 +105,7 @@ $.effects.effect.bounce = function( o, next ) {
queue.splice.apply( queue,
[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
}
- next();
+ el.dequeue();
};