如何設置淡入淡出效果的計時器?假設text1將在5秒內淡出,然後text2將出現,然後5秒後淡出,然後出現text3。我不熟悉jQuery。帶定時器的淡入淡出效果?
說我有3個文本:
<div class= "text1>Text 1</div>
<div class= "text1>Text 2</div>
<div class= "text1>Text 3</div>
我只有這個:
$(".text1").fadeOut(5000); //now that a timers.
你可以使用迭代您元素,並將其包裝成。每個$ setTimeout,你會得到fadeOut動畫從text1然後text2等等延遲5秒... – 2012-03-28 14:02:59