title: close side menu when clicked outside
body: <p>this is my code for a menu that comes in from the right side... heres is the js</p>
  
  <pre><code>jQuery(document).ready(function($) {
      var $toggleButton = $('.toggle-button'),
          $menuWrap = $('.menu-wrap'),
          $sidebarArrow = $('.sidebar-menu-arrow');
              $content = $('.content');
      // Hamburger button
      $toggleButton.on('click', function() {
          $(this).toggleClass('button-open');
          $menuWrap.toggleClass('menu-show');
          $content.toggleClass('content-background');
      });
  
      // Sidebar navigation arrows
      $sidebarArrow.click(function() {
          $(this).next().slideToggle(300);
      });
  });
  </code></pre>
  
  <p>i want it to close automatically when clicked outside anywhere out side the menu. how can i do this.</p>