JSFiddle - React, Tailwind, and code Playground

by Keith Henry

HTML

<div>
 <div class="node">
     Node
     <div class="children">Children</div>
    </div>
</div>

CSS

div {
    padding: 1em;
    border: 1px dotted grey;
}

.node { cursor: pointer; }

.children { display: none; }

JavaScript

$('.node').click(function() {
    $('.children').toggle('blind');
});