JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr id="25">
<td class="remain"></td>
<td>Something</td>
</tr>
<tr id="30">
<td class="remain"></td>
<td id='hello'>Something else</td>
</tr>
</table>
JavaScript
$(document).ready(function(){
$('tr[id]').each(function () {
var $this = $(this);
var count = parseInt($this.attr("id"));
countdown = setInterval(function(){
$('.remain', $this).html(count + " seconds remaining!");
if (count-- == 0) {
//do something
clearInterval(countdown);
$('#hello').text('hello');
}
}, 1000);
});
});