title: How do you remove and hide HTML elements in plain Javascript?
body: <p>I have this HTML:</p>
  
  <pre><code>&lt;body&gt;
      &lt;div id="content-container" style="display:none"&gt;
           &lt;div&gt;John&lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="verifying"&gt;
           &lt;div id="message"&gt;Verified&lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>And this Javascript:</p>
  
  <pre><code>var body = document.body;
  var signup = document.getElementById("content-container");
  
  setTimeout(function(){
      body.removeChild('verifying');
      signup.style.display = "block";
  }, 5000);
  </code></pre>
  
  <p>I am trying to remove <code>&lt;div id="verifying"&gt;</code> and show <code>&lt;div id="content-container"&gt;</code> after 5 seconds, but for some reason it is not working. Any idea why? I am loading the script after the page loads so that is not the problem.</p>