【发布时间】:2013-12-08 09:55:39
【问题描述】:
【问题讨论】:
-
不是已经有动画了吗?你到底想让它做什么?
标签: jquery animation text jquery-animate
【问题讨论】:
标签: jquery animation text jquery-animate
你启动一个动画,启动后直接停止它:
$(".dynamo").animate({"opacity": "0"}, 500).stop();
使用
$(".dynamo")
.stop() // Stop on-going animation
.animate({"opacity": "0"}, 500, function() {
// After first animation finished
$(this).html(array[i]).animate({ opacity: 1 });
});
【讨论】:
complete -- Type: Function() -- A function to call once the animation is complete.
您可以使用jquery 库的fadeIn 和fadeOut 方法。 您应该使用 position: absolute 创建第二个元素,将不透明度设置为零并对两个元素进行动画处理(当然,删除第一个元素)。
【讨论】: