From fe55b6cddb00b85a56f9eb8f753b0535690d8b95 Mon Sep 17 00:00:00 2001 From: Corey Frang Date: Mon, 30 Apr 2012 00:19:52 -0500 Subject: Effects: Updating unit tests to use some more stable logic hopefully --- ui/jquery.effects.core.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'ui') diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index bac060067..edf9aa400 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -268,16 +268,15 @@ $.effects.animateClass = function( value, duration, easing, callback ) { // map all animated objects again - this time collecting a promise allAnimations = allAnimations.map(function() { var styleInfo = this, - dfd = $.Deferred(); - - this.el.animate( this.diff, { - duration: o.duration, - easing: o.easing, - queue: false, - complete: function() { - dfd.resolve( styleInfo ); - } - }); + dfd = $.Deferred(), + opts = jQuery.extend({}, o, { + queue: false, + complete: function() { + dfd.resolve( styleInfo ) + } + }); + + this.el.animate( this.diff, opts ); return dfd.promise(); }); -- cgit v1.2.3