title: Javascript/jQuery won't hide HTML element
body: <p>I'm trying to hide a section in my HTML code, but I already tried everything, I even used jQuery, but it just doesn't work, it won't hide it either way.</p>
  
  <pre><code>&lt;div class="coding2"&gt;
          &lt;div class="box"&gt;
              &lt;div class="JavS"&gt;
                  &lt;h1&gt;JavaScript&lt;/h1&gt;
                  &lt;span class="barr"&gt;&lt;/span&gt;
                  &lt;p&gt;bla bla bla bla bla&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class="htmlCSS"&gt;
                  &lt;h1&gt;HTML/CSS&lt;/h1&gt;
                  &lt;span class="barr"&gt;&lt;/span&gt;
                  &lt;p&gt;bla bla bla bla bla &lt;/p&gt;
              &lt;/div&gt;
              &lt;div class="php"&gt;
                  &lt;h1&gt;PHP&lt;/h1&gt;
                  &lt;span class="barr"&gt;&lt;/span&gt;
                  &lt;p&gt;bla bla bla bla bla&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>This is the top of the HTML file, and I don't think the problem is here.</p>
  
  <pre><code>&lt;head&gt;
      &lt;link rel="stylesheet" href="style.css" type="text/css"&gt;
      &lt;script src="jquery-2.2.3.min.js"&gt;&lt;/script&gt;
      &lt;script src="main-jquery.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>I already tried everything like I said, usually I google the hell out of it before trying to ask it somewhere, but this time, I can't figure out why it isn't hiding.</p>
  
  <p>@edit</p>
  
  <p>The code I tried in "main-jquery.js"</p>
  
  <p>(with jQuery)</p>
  
  <pre><code>$(function(){
      $('.coding2').hide();
  });
  </code></pre>
  
  <p>(with pure JavaScript)</p>
  
  <pre><code>document.getElementById(".coding2").style.visibility = "none";
  </code></pre>
  
  <p>and</p>
  
  <pre><code>document.getElementById("#coding2").style.visibility = "hidden";
  </code></pre>
  
  <p>(yes, when did the last one I edited the class "coding2" to id="coding2" but it didn't do anything)</p>
  
  <p>I want to hide the entire div "coding2"</p>
  
  <p>@edit2</p>
  
  <p>I got what I wanted, special thanks to: @Fabio and @JamesBurton
  (thanks everyone!)</p>