In CSS I have a div tag that is like a comment section, but I want it hidden until the user clicks on the comment image. How do I make the div display when the user clicks on it using JavaScript?
HTML:
<div class = "comments">
<img onclick = "commentBar()" src = "comment.png" />
</div>
CSS:
.comments{
width: 200px;
height: 200px;
background-color: blue;
display: none;
}
How do I make the div tag re-appear when I click on the image?
visibilitythat would be a different story.) I just didn't want to phrase it too technical, but rather "blunt" to point out the obvious error in reasoning.