开发者

TextBox Foreground color in jquery

开发者 https://www.devze.com 2023-01-08 07:52 出处:网络
Why isn\'t this piece开发者_如何学JAVA of code working? $(\"#TextOne\").animate({ color: \"#FFFF00\" }, 800);

Why isn't this piece开发者_如何学JAVA of code working?

$("#TextOne").animate({ color: "#FFFF00" }, 800);

When i call it on a button click it does nothing. I have Chrome.


Are you using the color plugin (or jQuery UI)?

Without one of these it won't work because jQuery does not natively support the animation of color properties.


You can't fade colors :( You need Color plugin for that :)


Try the following.

define a css color like this.

.anim-color
    {
        color:##FFFF00;
    }

animate on a class like this.

$("#TextOne").animate({ className: 'anim-color' }, 800);
0

精彩评论

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

关注公众号