title: #id selector not working in jQuery
body: <p>This is probably a triviality, but I cannot manage to make this simple code work. The bits of interest are reported below.</p>
  
  <pre><code>&lt;script&gt;
      $("#link1").click(function(){
          $("#content").fadeOut(200);
      });
  &lt;/script&gt;
  
  [....]
  
  &lt;nav&gt;   
      &lt;a class="navLink" id="link1"&gt;Link1&lt;/a&gt;
      &lt;a class="navLink" id="link2"&gt;Link2&lt;/a&gt;
      &lt;a class="navLink" id="link3"&gt;Link3&lt;/a&gt;
      &lt;a class="navLink" id="link4"&gt;Link4&lt;/a&gt;
  &lt;/nav&gt;                   
  
  &lt;div id="container"&gt;    
      &lt;div id ="content"&gt;            
          &lt;p&gt;This is a paragraph.&lt;/p&gt;
      &lt;/div&gt;        
  &lt;/div&gt;
  </code></pre>
  
  <p>The idea is to make the div "content" disappear when clicking on Link1. But it just does not happen. Interestingly, if I replace the script as shown below and add a onclick event trigger to Link1 then it works.</p>
  
  <pre><code>&lt;script&gt;
      function disappear(){
          $("#content").fadeOut(200);
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>This suggests that the <code>#id</code> selector actually works (at least for "content"). Does anyone see where the issue is in my code?</p>
  
  <p>Thank you in advance,
  ETtore</p>