JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<div id="sidebar">
<p>sidebar</p>
</div>
<div id="content">
<button class="hSidebar">=</button>
</div>
CSS
#sidebar
{
width: 250px;
float: left;
background-color: #eee;
height: 100px;
}
#content
{
overflow: hidden;
background-color: #ddd;
height: 100px;
}
JavaScript
$(function()
{
$(document).on('click', '.hSidebar', function()
{
$('#sidebar').toggle();
});
});