JSFiddle - React, Tailwind, and code Playground
by Sean Coker
HTML
<table>
<tr>
<td>
first row
</td>
<tr>
</table>
CSS
.boldclass {
font-weight:bold;
background:#blue;
text:#fff;
}
JavaScript
$(function(){
var i = 1, newRow = false, clearBold;
setInterval(function() {
$('table').prepend('<tr><td class="boldclass">appended row' + i + '</td></tr>');
clear();
newRow = true;
}, 5000)
//check every so often if there is a new '.boldclass'
function clear() {
clearBold = setTimeout(function() {
console.log('here');
if (newRow) {
$('table td').removeClass('boldclass');
clearTimeout(clearBold);
}
}, 2000);
}
});