title: Use jQuery to hide a DIV when the user clicks outside of it
body: <p>I am using this code:</p>
  
  <pre><code>$('body').click(function() {
     $('.form_wrapper').hide();
  });
  
  $('.form_wrapper').click(function(event){
     event.stopPropagation();
  });
  </code></pre>
  
  <p>And this <strong>HTML</strong>:</p>
  
  <pre><code>&lt;div class="form_wrapper"&gt;
     &lt;a class="agree" href="javascript:;"&gt;I Agree&lt;/a&gt;
     &lt;a class="disagree" href="javascript:;"&gt;Disagree&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The problem is that I have links inside the <code>div</code> and when they no longer work when clicked.</p>