Skip to content
Permalink
Browse files

Fixed the initialization of color animations for cases where the firs…

…t step of the animation doesn't happen in the same millisecond as the call to animate. Fixes #4251 - NaN in color animation (Firefox 3).
  • Loading branch information
scottgonzalez committed Sep 20, 2009
1 parent c699089 commit 217266fb62b821e8edc0aeb37428a7370848e060
Showing with 2 additions and 1 deletion.
  1. +2 −1 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(' +

0 comments on commit 217266f

Please sign in to comment.
You can’t perform that action at this time.