JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr>
<td>
<div id="content">content</div>
</td>
</tr>
</table>
<input id="animate" type="button" value="animate" />
<input id="toggle2000" type="button" value="toggle(2000)" />
<input id="toggle" type="button" value="toggle" />
CSS
td {
border: 2px solid blue;
height: 50px;
}
div#content {
border: 2px solid red;
width: 100px;
}
JavaScript
$('#animate').click(function() { $('#content').animate({width:'toggle'}, 2000); });
$('#toggle2000').click(function() { $('#content').toggle(2000); });
$('#toggle').click(function() { $('#content').toggle(); });