Based on
JQuery fade with loop and delay
How can I fade in out two text lines and not overlapping both?
My HTML:
<div id="div_1" style="position:fixed;top:0;left:0;"> aaa bbb ccc ddd eee </div>
<div id="div_2" style="position:fixed;top:0;left:0;"> 111 222 333 444 555 </div>
div_1 is first displayed and faded out, then div_2 fade in, then fade out, then div_1 fade in, and so on
You can join two objects to be animated together using the
.add()function:http://api.jquery.com/add/