开发者

cant get color animation to work

Simple just trying to animate a p-tag #disclaimer to highlight the background color.

Example in jQuery:

$('#disclaimer').animate({'backgroundColor':'#ff9f5f'}, 2000);

The html is a simple

<p id="disclaimer"> disclaimer here </p>

But when I try to open the page in IE here is the JS error:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0开发者_如何转开发C; .NET4.0E; .NET CLR 1.1.4322) Timestamp: Mon, 26 Jul 2010 17:57:09 UTC

Message: Invalid property value. Line: 141 Char: 6 Code: 0 URI: file:///C:/Users/xxxxx/Desktop/MyJQuerySite/lib/jquery-1.4.min.js

Am I doing something incorrectly ?


jQuery doesn't natively support animations on colors. In order for this to work you'll need to include the jQuery color plugin.

Here's a blurb about it in the jQuery 1.2 Release Notes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜