jquery – 用.animate更改文本(html)

我试图使用jQuery的Animate函数来动画化标签的HTML部分(< font id =“test”size =“7”> This Text!< / font>),如下所示:
$("#test").delay(1500).animate({text:'The text has Now changed!'},500);

但是没有任何反应,它不会改变文本。

我如何做到这一点?谢谢!

解决方法

animate(..)功能的签名是:
.animate( properties,options );

并且它说了以下关于参数属性

properties A map of CSS properties that
the animation will move toward.

文本不是CSS属性,这就是为什么这个函数不能按照你的预期工作。

你想淡化文字吗?你要移动吗?我可能会提供一个替代方案。

看看following fiddle

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: &lt;span id=&quot...
jQuery 添加水印 &lt;script src=&quot;../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...