JSFiddle - React, Tailwind, and code Playground

by linmic

HTML

<button class="show">Show</button>
<button class="hide">Hide</button>
<div></div>

CSS

button {
    display: inline-block;
    width: 48px;
    line-height: 30px;
    padding: 0;
    text-align: center;
}

div {
    width: 100px;
    height: 100px;
    background: black;
    display: none;
}

JavaScript

$('.show').click(function() {
    $('div').show();
});
    
$('.hide').click(function() {
    $('div').hide();
});