JSFiddle - React, Tailwind, and code Playground
by Fansublogger
HTML
<span class="hilang">Hilang</span>
<span class="muncul">Muncul</span>
<div id="target"></div>
CSS
body {padding:30px;}
.muncul, .hilang {
background:#56af2e;
color:white;
text-align:center;
padding:8px 12px;
font-family:Tahoma, Verdana;
font-size:13px;
border-radius:5px;
cursor:pointer;
}
#target {
background:#1f57a3;
height:150px;
margin-top:15px;
}
JavaScript
$('.hilang').click(function() {
$('#target').hide('fast');
});
$('.muncul').click(function() {
$('#target').show('slow');
});