JSFiddle - React, Tailwind, and code Playground
HTML
<ul id="randomCol">
<li>test1</li>
<li>test2</li>
<li>test3</li>
<li>test4</li>
<li class="color">test5</li>
<li>test6</li>
<li>test7</li>
<li>test8</li>
<li>test9</li>
<li>test10</li>
</ul>
CSS
li {
background-color:#FFF;
}
.color {
background-color:#F00;
}
* {
transition: background-color 1s;
-webkit-transition: background-color 1s;
}
JavaScript
var tid = setInterval(changeUp, 1000);
function changeUp() {
var i = Math.floor((Math.random()*9)+1);
$('#randomCol').children().removeClass('color');
$('#randomCol').children().eq(i).addClass('color');
}