aboutsummaryrefslogtreecommitdiffstats
path: root/src/effects.js
diff options
context:
space:
mode:
authorCorey Frang <gnarf@gnarf.net>2012-08-15 14:31:37 -0500
committerDave Methvin <dave.methvin@gmail.com>2012-08-19 22:09:08 -0400
commit0fea007a1a4d6456a8c7d246e4f7a4e14a1ba04a (patch)
tree8998f8e3fc0264c4eeb55b89ee6bc01ab2f68e6e /src/effects.js
parent3812f9436da09d9f31ca4a61a14cd70f3e8cbeaf (diff)
downloadjquery-0fea007a1a4d6456a8c7d246e4f7a4e14a1ba04a.tar.gz
jquery-0fea007a1a4d6456a8c7d246e4f7a4e14a1ba04a.zip
Fix #12273. Don't call easing functions for duration 0 animations. Close gh-895.
Diffstat (limited to 'src/effects.js')
-rw-r--r--src/effects.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/effects.js b/src/effects.js
index 3405cfdc2..cc2a26a1e 100644
--- a/src/effects.js
+++ b/src/effects.js
@@ -376,7 +376,13 @@ Tween.prototype = {
var eased,
hooks = Tween.propHooks[ this.prop ];
- this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration );
+ if ( this.options.duration ) {
+ this.pos = eased = jQuery.easing[ this.easing ](
+ percent, this.options.duration * percent, 0, 1, this.options.duration
+ );
+ } else {
+ this.pos = eased = percent;
+ }
this.now = ( this.end - this.start ) * eased + this.start;
if ( this.options.step ) {