JSFiddle - React, Tailwind, and code Playground
by snover
HTML
<button onclick="toggleText()">Toggle Text</button>
<table>
<tr class="text">
<td class="text">This is the text that will be hidden/shown</td>
<td class="text">#2</td>
</tr>
<tr class="text">
<td class="text">more text</td>
<td class="text">again</td>
</tr>
</table>
JavaScript
var visible = true;
function toggleText() {
if (visible) {
$(".text").fadeOut("fast");
visible = false;
} else {
$(".text").fadeIn("fast");
visible = true;
}
}