JSFiddle - React, Tailwind, and code Playground
by craigm
HTML
<div id="container"></div>
JavaScript
$(document).ready(function(){
var text1 = $('<h1>Text1</h1>').hide().prependTo("#container");
var text2 = $('<h1>Text2</h1>').hide().prependTo("#container");
var text3 = $('<h1>Text3</h1>').hide().prependTo("#container");
var text4 = $('<h1>Text4</h1>').hide().prependTo("#container");
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);
});
});
});
});
});
});
});