0

Im making a script to automatically change the style attribute of display from "none" to just "" So it displays what was invisible automatically, The HTML ive been trying to change is this display: <div id="f1" class="answerGuide" style="display:none">

Ive been trying to use

document.getElementsByClassName("answerGuide").style.display = "";
or
document.getElementById("f1").style.display = '';

But each time I get Cannot set property "display" of undefined :( I don't know whats the problem, everything looks fine I even tried setting the display to "initial" or "inline" but I got the same result. Any help with fixing this problem would be greatly appreciated! =D

m-byte
  • 115
  • 1
  • 1
  • 6

0 Answers0