title: jQuery click open/close div but need to close by clicking anywhere
body: <p>Ok here is some jQuery code I'm using in order to click and open/close a div. It works great but I would like to be able to click anywhere on the page to close it. I read about e.stopPropagation but I don't know how I can use it in this code, or where to put it. Can someone help? Thanks.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $('#test').hide().before('&lt;a href="#" id="toggle-menu" class="menu"&gt;&lt;img src="images/menu.png" alt="Menu" /&gt;&lt;/a&gt;');
              $('a#toggle-menu').click(function(e) {
                  e.stopPropagation();
                  $('#test').slideToggle(200);
                  return false;
              });
          });
          &lt;/script&gt;
  
  &lt;div id="test"&gt;&lt;/div&gt;
  </code></pre>