JSFiddle - React, Tailwind, and code Playground

by jt3k

HTML

<table>
<tr> <td>1 <td>2
<tr> <td>4 <td>3
<tr> <td>5 <td>6
<tr> <td>8 <td>7
</table>

CSS

td { width: 200px;
background:red;border:1px solid black}

JavaScript

$('tr td:first-child').click(
    function(){
        $(this).next('td').toggle();
    
    }
);