JSFiddle - React, Tailwind, and code Playground
by deadlyicon
HTML
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
CSS
li.strong{
font-weight: bold
}
JavaScript
jQuery.fn.isEmpty = function() {
return this.length === 0;
};
jQuery.fn.isPresent = function() {
return !this.isEmpty();
};
jQuery.fn.or = function(other) {
if (this.isPresent()) return this;
if ($.isFunction(other)) return other.call(this);
return other;
};
setInterval(function(){
$('li.strong').or($('li:last'))
.removeClass('strong')
.next().or(function(){ return $('li:first'); })
.addClass('strong');
},1000);