JSFiddle - React, Tailwind, and code Playground
HTML
<div id="one" class="content"></div>
<div id="two" class="content"></div>
<button id="slide">Slide it</button>
CSS
.content {
width: 100%;
height: 50px;
}
#one {
background-color: #000;
}
#two {
background-color: #CFCFCF;
}
JavaScript
$('#slide').on('click', function() {
$('#one').slideToggle();
})