I am trying to change the attribute "hidden" of the element to true by javascript after a timeout of 1,000 millisecond but it is not changing the attribute. Yes the timeout is working fine I've tested that, all functions are correct! Only the last part in which by using the setAttribute() function is not working.
HTML:
<div id="gamePanel" hidden="true">
<div id="bb">
<div id="map">
</div>
</div>
<p id="status"> Welcome Back! </p>
<input type="button" id="changeBio" value="Change Map" />
<input type="button" id="saveGame" value="Save Game" />
<div id="statusBar"> Status </div>
</div>
Javascript:
var panel = document.querySelector("#gamePanel");
panel.setAttribute("hidden","false");