JQuery Animation随机失败

时间:2009-12-01 09:59:42

标签: jquery

我尝试在我的网站中实现jQuery Animation,但是在几秒,几分钟或几小时之后,动画会引发错误:“无效的属性值”第154行Char 4889 jquery-ui-1.7.2-custom.js。< / p>

这是我的代码:

            $(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);

当然,ID已正确设置。 当动画挂起时,此ID不会再动画,所以它非常神秘。请帮助,紧急。

这是失败的代码,从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(",")+")"}});

1 个答案:

答案 0 :(得分:3)

试试这个

$(idTimer).animate({'backgroundColor': '#aa0000', 'color': '#ffffff'}, 1000);
相关问题