title: Hide/Show Element with jQuery
body: <p>I'm trying to learn jQuery and Javascript. I want to hide and show a Div Element (div2) with a button on a webpage using a button I have placed on the page. However, I want the jQuery code to be placed in a separate file referenced later on (like a custom .css file). Here's my basic code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#div1{
   background-color: aquamarine; 
  }
  
  #div2{
   background-color: firebrick; 
  }
  
  #hide_show{
   
  background-color: cornflowerblue;
   
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
   
   &lt;head&gt;
    
     
      &lt;link href="special.css" rel="stylesheet" type="text/css"&gt;
    
    &lt;/head&gt;
  
   &lt;body&gt;  
  
    &lt;div id ="div1"&gt;
     
     this is a container
     
    &lt;/div&gt;
    
    &lt;div id = "div2"&gt;
    
     This is another div.
    
    &lt;/div&gt;
    
    &lt;button type="button" id ="hide_show"&gt;Click Me!&lt;/button&gt;
   
  
   &lt;/body&gt;
   
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Referencing the file isn't an issue. However, how do I go ahead with writing the Javascript file? Also, does the text editor of your choice affect how Javascript is executed on the website? I'm currently using codeblocks.</p>
  
  <p>Thanks.</p>