JSFiddle - React, Tailwind, and code Playground
HTML
<span id='a'>Hello</span>
<span id='b'>world</span>
<span id='c'>!!!</span>
CSS
span {
display: none;
}
JavaScript
var d = 500; // duration
// Execute in parallel.
//$('#a').show(duration).hide(duration);
//$('#b').show(duration).hide(duration);
//$('#c').show(duration).hide(duration);
var chainOfActions = [
function() { return $('#a').fadeIn(d).fadeOut(d); },
function() { return $('#b').fadeIn(d).fadeOut(d); },
function() { return $('#c').fadeIn(d).fadeOut(d); },
];
chainOfActions.reduce(function(curr, next) {
return curr.then(next);
}, $().promise());