I am new and making a project, but I have hit a roadblock. I made this demonstration to show my problem. I have already tried:
-Turning the opacity to 0.0
-Moving the “div”s off of the page
-Rearranging the order of the code
How do I make the red rectangle disappear when it is clicked?
document.getElementsByTagName returns an array, so it considered ".display" as an array attribute, which is not the case.
You should select only the first element, using document.getElementsByTagName, here is the code: