title: How to Use document.getElementById to do switch the CSS to "display:none"
body: <p>I want to use <code>document.getElementById</code> to change the CSS property.<br>
  I tried using this:</p>
  <pre class="lang-js prettyprint-override"><code>var x = document.getElementById(&quot;id&quot;);
  x.style.display = &quot;none&quot;;
  </code></pre>
  <p>But this is not working.
  <br>Do you have any suggestions as to why this will not work?
  <br><strong>EXTRA INFO:</strong><br>There is no error returned, my code just straight up does not work.
  <br>I am also using the <code>&lt;img&gt;</code> tag in the <code>document.getElementById</code>
  <br>If that helps.</p>