JSFiddle - React, Tailwind, and code Playground
HTML
<div class="current" id="current">
<button id="btnclick" >Qlick me</button>
</div>
CSS
div {
width: 200px;
height: 200px;
background-color: #eee;
border: 1px solid black;
}
.current_active{
background-color: red;
}
JavaScript
$("#btnclick").click(function(){
$("#current").toggleClass("current_active");
});