TextBox Foreground color in jquery

前端 未结 3 381
北荒
北荒 2021-01-28 05:12

Why isn\'t this piece of code working?

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

When i call it on a button click it does nothing.

3条回答
  •  渐次进展
    2021-01-28 05:38

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

提交回复
热议问题