JSFiddle - React, Tailwind, and code Playground
by mraufk
HTML
<div id="div2">
</div>
<div id="div1">
</div>
CSS
#div1
{
width:100px;
height:100px;
background-color:Red;
}
#div2
{
width:20px;
height:5px;
background-color:Blue;
}
JavaScript
$('#div2').click(function() {
$('#div1').animate({
width: 'toggle'
}, 1000);
});