<div id="uniqueDiv">
<button id="uniqueButton1" class="uniqueClass">Hit</button>
<button id="uniqueButton2" class="uniqueClass">Run</button>
</div>
<div id="uniqueDiv2">
<p id="uniqueId1"></p><!-- points -->
<p id="uniqueId2"></p><!-- strikes -->
</div>
<div id="uniqueDiv3">
<button id="uniqueButton3" class="uniqueButtonClass">Score</button>
</div>
<script>
document.getElementById("uniqueButton1").onclick=function(){
document.getElementById("uniqueDiv").style.display="none";
document.getElementById("uniqueDiv2").style.display="block";
document.getElementById("uniqueDiv3").style.display="block";
}
</script>
I have styled the display
property of uniqueDiv3
, uniqueDiv2
to none
and the display
property of uniqueDiv
to block
in css. When I click on the "Hit" button, I want uniqueDiv3
and uniqueDiv2
to appear while uniqueDiv
disappears. However, the functionality does not seem to work correctly.