title: Mobile Menu toggleClass and removeClass
body: <p>So I have your typical button to display the menu on mobile devices. The first code works great. Click the button and the menu opens and closes. The client wants the menu to close if you click on something other than the menu, including the button. Once I add the second code, the menu opens when you click on the button and closes when you click on the "content." But the menu doesn't close when you click on the button again. I've tried changing "toggleClass" to just "addClass" but it's the same issue. The button is not part of the menu so I'm kind of at a loss here. Can anyone help? Need I explain more? </p>
  
  <pre><code>$(document).ready(function(){
      $("#mobile-menu-button").click(function () {
          $("#mobile-nav").toggleClass("nav-open");
          $(".mobile").toggleClass("to-left");
      });
  });
  
  /* When Mobile Menu open, close by clicking other than menu */
  
  $(document).mouseup(function (e) {
      var container = $(".nav-open");
      if (!container.is(e.target)
      &amp;&amp; container.has(e.target).length === 0) {
          container.removeClass("nav-open");
          $(".mobile").removeClass("to-left");
      }
  });
  </code></pre>