JSFiddle - React, Tailwind, and code Playground
by rough cheap
HTML
<table>
<tr>
<th>A</th>
<th>B</th>
</tr>
<tbody class="partA">
<tr>
<td>Comment</td>
<td>Comment</td>
</tr>
</tbody>
<tbody class="partB">
<tr>
<td>CommentB</td>
<td>CommentB</td>
</tr>
</tbody>
</table>
<button id="clickme">
Click Me!
</button>
JavaScript
$(function() {
$('.partA').show();
$('.partB').hide();
$('#clickme').live('click', function() {
alert('hide');
$('.partA').hide();
$('.partB').show();
});
});