JSFiddle - React, Tailwind, and code Playground
HTML
<div class="block"></div>
<div class="block"></div>
<div class="block clear"></div>
<div class="block"></div>
CSS
.block { background-color: #0ff; width: 100px; height: 100px; margin-right: 10px; margin-bottom: 10px; float: left; }
.clear { clear: both; }
JavaScript
$('.block').bind('fade-cycle', function() {
$(this).fadeOut('fast', function() {
$(this).fadeIn('fast', function() {
$(this).trigger('fade-cycle');
});
});
});
$('.block').each(function(index, elem) {
setTimeout(function() {
$(elem).trigger('fade-cycle');
}, index * 250);
});