JSFiddle - React, Tailwind, and code Playground

HTML

<div id='container'>
    <div id='toggle' class=''>
    </div>
<div id='hoverbug'></div>
</div>

CSS

#hoverbug {
    width: 50px;
    height: 50px;
    background: green;
}

#hoverbug:hover {
    background: red;
}

#toggle {
    height: 10px;
}

#toggle.big {
    height: 100px;
}

JavaScript

var state = 0;
$('#hoverbug').bind('click', function() {
    state += 1;
    state %= 2;
    var cssclass = state ? 'big' : '';
    $('#toggle').attr('class', cssclass);
});