JSFiddle - React, Tailwind, and code Playground

HTML

<div id="toggle">
    
</div>

<div id="toggle2">
    
</div>

CSS

div {
    background: #CCC;
    height: 100px;
    width: 100px;
}

#toggle2 {
    float: left;
}
}

JavaScript

$('#toggle, #toggle2').on('click', function() {
    $(this).toggle('fold');
});