JSFiddle - React, Tailwind, and code Playground
HTML
<div class="example">This is some text</div>
CSS
.red{
background:red;
}
JavaScript
var $el = $(".example:first"), text = $.trim($el.text()),
words = text.split(" "), html = "";
for (var i = 0; i < words.length; i++) {
html += "<span>" + words[i] + ((i+1) === words.length ? "" : " ") + "</span>";
};
$el.html(html).children().hide().each(function(i){
$(this).delay(i*200).fadeIn(700);
});
setTimeout(function(){
$el.text(function(i, text){
return $.trim(text);
}).addClass('red');
}, $el.children().length * 200 + 500);