JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" value="show x-scroll bar" /><br />
<div id="bar"></div>
inner height: <a id = "innerHeight"> px</a>
CSS
#bar {
width:500px;
border:1px solid;
display:none;
}
JavaScript
$('#innerHeight').html(window.innerHeight);
$('input').click(function () {
if ($('#bar').is(':visible')) {
$('#bar').hide();
$(this).val('show x-scroll bar');
$('#innerHeight').html(window.innerHeight);
} else {
$('#bar').show();
$(this).val('hide x-scroll bar');
$('#innerHeight').html(window.innerHeight);
}
})