JSFiddle - React, Tailwind, and code Playground

HTML

<table>
<tr class="ligne">
    <td>one</td>
</tr>
<tr class="ligne">
    <td>two</td>
</tr>
<tr class="ligne">
    <td>three</td>
</tr>
<tr class="ligne">
    <td>four</td>
</tr>
</table>

<input id="btn-timeout" type="submit" value="timeout!"/>

CSS

td{
border:1px solid black;
padding:20px;
margin:10px;}

input{
margin-top:20px;}

JavaScript

$(document).on({
    click: function() {

        var index = 0;
        
        $(".ligne").each(function() {
            
            var obj = $(this);

            setTimeout(function() {

                obj.css('background', 'blue');

            }, 1000 * ++index);

        });


    }

}, "#btn-timeout");