JSFiddle - React, Tailwind, and code Playground
by rossipedia
HTML
<li id="nav_about"><a href="">Loren ipsum <span id="adjective">1</span></a>
</li>
JavaScript
var terms = ["1", "2", "3", "4"];
var idx = 0;
function pulseAdjective() {
idx++;
// Wrap around to beginning
if(idx == terms.length)
idx = 0;
var term = terms[idx];
$('#adjective').fadeOut(500, function(){ $(this).text(term); $(this).delay(100).fadeIn(500); });
}
setInterval(pulseAdjective, 2000);