tags:

views:

143

answers:

1

Hi guys,

I tried to implement jQuery Animation in my site, but randomly after seconds, minutes or hours, the animation throws an error: "Invalid property value" Line 154 Char 4889 jquery-ui-1.7.2-custom.js.

Here is my Code:

            $(idTimer).animate({backgroundColor: '#aa0000', color: '#ffffff'}, 1000);
            $(idPrice).animate({backgroundColor: '#aa0000', color: '#ffffff'}, 1000);

            $(idTimer).animate({backgroundColor: '#ffffff', color: '#f67802'}, 1000);
            $(idPrice).animate({backgroundColor: '#ffffff', color: '#000000'}, 1000);

Of course the IDs are correctly set. When the animation hangs up, no animation will be done anymore for this ID, so it's very mysterious. Please help, its urgent.

Here is the failing code, beginning char 4889:

h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});
+2  A: 

See this question.

kgiannakakis
Seems the solution helps, no problems at all, but it very high reduces the animation. The rainbow-effect from black to red and back from red to black is ~80% shorter then before. So it become red in 100ms, stay red 900ms and get back black 100ms. Before it was 700ms effect from black to red, 600ms stay red, 700ms effect from red to black, you understand?
Kovu