Within my main canvas, there are three smaller canvases and a text element.
<canvas id="Background" width="350" height="300"
style="border:6px solid black; position: absolute; left: 10px; top: 10px;">
</canvas>
<canvas id="Canvas1" width="150" height="100"
style="border:6px solid blue; position: absolute; left: 33px; top: 20px;">
</canvas>
<canvas id="Canvas1" width="50" height="50"
style="border:6px solid yellow; position: absolute; left: 33px; top: 200px;">
</canvas>
<canvas id="Canvas1" width="150" height="100"
style="border:6px solid blue; position: absolute; left: 33px; top: 20px;">
</canvas>
<canvas id="Canvas1" width="150" height="100"
style="border:6px solid blue; position: absolute; left: 243px; top: 20px;">
</canvas>
</div>
<div style="position: absolute; left: 70px; top: 50px;">
<p> example </p>
</div>
My plan is to implement an onclick
event so that when I click on a specific area, the text and one of the canvases disappear. I am seeking advice on how to toggle visibility in this code structure. Thank you!