JSFiddle - React, Tailwind, and code Playground
HTML
<div id="mytext">This is the Starting Text</div>
JavaScript
var timeoutQueue = [],
currentDelay = 500;
$ta1 = $('#mytext');
function newSequence(fn, expectedlength, delayafter){
timeoutQueue.push( setTimeout(fn, currentDelay) );
currentDelay += (expectedlength + delayafter);
}
newSequence(function(){$ta1.fadeOut(500);},500,1000);
newSequence(function(){$ta1.text("hey").fadeIn(500);},500,1000);
newSequence(function(){$ta1.fadeOut(500);},500,1000);
newSequence(function(){$ta1.text("It Can't possibly be this simple.").fadeIn(500);},500,1000);