JSFiddle - React, Tailwind, and code Playground
HTML
<button>Clic</button>
<div></div>
CSS
div{
background: red;
width: 100%;
height: 10em;
}
JavaScript
var comodin = false;
$("button").click(function(){
if (!comodin){
$("div").css("width", "80%");
}
else{
$("div").css("width", "100%");
}
comodin = !comodin;
});