title: Trying to close mobile menu (removing class) when clicking outside of element without effecting nav button
body: <p>I'm really struggling to make this work. I have a mobile menu that opens on clicking the button in the header.
  This adds an active class to the menu to display it. I have made it full width and locked scrolling. But I want it to close when clicking outside the menu, (removing the class) but I can't get it to work.</p>
  
  <p>This is what I've tried:</p>
  
  <pre><code>&lt;script&gt; 
  jQuery(document).click(function(event) { 
  if(!jQuery(event.target).closest('.navgrid .site__header--mobilenav, .burgerbox').length) {
      if(jQuery('#mobilenavcontainer').hasClass('site__header--mobilenav-active')){
      jQuery('jQuery').removeClass('site__header--mobilenav-active')
  }
  
  }        
  }); 
  &lt;/script&gt;
  </code></pre>
  
  <p>But it doesn't seem to work...</p>