title: Why cant read property 'style' of null in JavaScript?
body: <p>I keep getting stuck on this javascript error!
  All I want to do is edit two values for CSS properties when a button is clicked.
  I keep getting this error: </p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'style' of null</p>
  </blockquote>
  
  <p>It occurs on the first document.getElementById line (below).</p>
  
  <p>I've added the JavaScript in the footer of the page, but have also trialed in other positions, so don't know why it can't pick up the element.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;a id="loadForm" href=""&gt;LINK&lt;/a&gt;
  &lt;div id="FormContainer"&gt;
      &lt;!-- CONTENT --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>$(document).ready(function () {
  
      jQuery('#loadForm').on('click', function (e) {
          e.preventDefault();
          document.getElementById('#FormContainer').style.display = 'block';
          document.getElementById('#FormContainer').style.visability = 'visible';  
      })
  });
  </code></pre>