aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.core.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-09-20 21:07:38 +0000
committerScott González <scott.gonzalez@gmail.com>2009-09-20 21:07:38 +0000
commit217266fb62b821e8edc0aeb37428a7370848e060 (patch)
tree7c54a40b9cd3ba5e92e73b051ade2db5536b816c /ui/jquery.effects.core.js
parentc6990895bed334f87133c433bd364585d3fd2d89 (diff)
downloadjquery-ui-217266fb62b821e8edc0aeb37428a7370848e060.tar.gz
jquery-ui-217266fb62b821e8edc0aeb37428a7370848e060.zip
Fixed the initialization of color animations for cases where the first step of the animation doesn't happen in the same millisecond as the call to animate. Fixes #4251 - NaN in color animation (Firefox 3).
Diffstat (limited to 'ui/jquery.effects.core.js')
-rw-r--r--ui/jquery.effects.core.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js
index 2f1d12bd3..700190e67 100644
--- a/ui/jquery.effects.core.js
+++ b/ui/jquery.effects.core.js
@@ -336,9 +336,10 @@ $.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
'borderRightColor', 'borderTopColor', 'color', 'outlineColor'],
function(i, attr) {
$.fx.step[attr] = function(fx) {
- if (fx.state === 0) {
+ if (!fx.colorInit) {
fx.start = getColor(fx.elem, attr);
fx.end = getRGB(fx.end);
+ fx.colorInit = true;
}
fx.elem.style[attr] = 'rgb(' +