JSFiddle - React, Tailwind, and code Playground
HTML
<div id="wrap">
<div id="console">
<p>Console Stuff Here</p>
<p>Console Stuff Here</p>
<p>Console Stuff Here</p>
<p>Console Stuff Here</p>
</div>
<div id="content">
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
<p>Content Stuff Here</p>
</div>
</div>
CSS
body {
margin: 0;
padding: 0;
}
#console {
background-color: #CCC;
border: 1px solid #000;
display: none;
padding: 10px;
position: absolute;
top: 0; right: 0; left: 0;
z-index: 1;
}
#content {
background-color: #EEE;
padding: 20px;
}
JavaScript
$(window).keypress(function(e) {
if (e.which == 96 || e.which == 126) {
$('#console').slideToggle();
}
});