JSFiddle - React, Tailwind, and code Playground
HTML
<div id="header" class="style2">
<div id="header2" class="style2">Public Vision</div>
</div>
<input id="showHideContainer" type="image" src="http://i.imgur.com/5LGqY2p.jpg?1" height="100" width="100" alt="On" ;>
CSS
body {
background-color:grey;
z-index:3;
}
body.style2 {
background-color:white;
z-index:3;
}
JavaScript
document.getElementById('showHideContainer').onclick = function () {
divTest = document.getElementById('header');
if (divTest.style.display === "none") {
divTest.style.display = 'block';
} else {
divTest.style.display = "none";
}
$('body').toggleClass('style2');
};