JSFiddle - React, Tailwind, and code Playground
by mblase75
HTML
<div class="row">
<div class="image">aa</div>
<div class="image">bb</div>
<div class="image">cc</div>
</div>
CSS
.active {
color: red;
}
JavaScript
window.__interval = setInterval(function() {
if (!$('.row .image:not(".active")').first().addClass('active').length) {
clearInterval(window.__interval);
};
console.log('looping');
},1000); // milliseconds