JSFiddle - React, Tailwind, and code Playground
by craigm
HTML
<div id="container"></div>
JavaScript
$(document).ready(function(){
var headers = [];
headers.push($('<h1>Text1</h1>').hide().prependTo("#container"));
headers.push($('<h1>Text2</h1>').hide().prependTo("#container"));
headers.push($('<h1>Text3</h1>').hide().prependTo("#container"));
headers.push($('<h1>Text4</h1>').hide().prependTo("#container"));
headers.each(function () {
});
text1.fadeIn(2000, function(){
text1.fadeOut(2000, function(){
text2.fadeIn(2000, function(){
text2.fadeOut(2000, function(){
text3.fadeIn(2000, function(){
text3.fadeOut(2000, function(){
text4.fadeIn(2000);
});
});
});
});
});
});
});