JSFiddle - React, Tailwind, and code Playground

HTML

<div id="box">Click me</div>
<div id="box2"></div>

CSS

#box {height:100px;width:100px;background-color:green;}
#box2 {height:100px;width:100px;background-color:blue;}
.show {display:inline-block;}
.hide {display:none;}

JavaScript

$('#box').click(function() {
  $('#box2').toggleClass('show hide');
});