title: An action before another in a Jquery function
body: <p>I want that when I click on "nav-toggle" it adds the toggle class "open" to "grappa". Then I would like to remove the toggle class "open" clicking anywhere on the web page.</p>
  
  <p>I wrote this but it doesn't working.</p>
  
  <pre><code>$(function() {
          $('.nav-toggle').on('click', function(){
              $('.grappa').toggleClass('open');{
                  $(document).click(function() {
                  $('.grappa').toggleClass('close');
               });
              }
          });
  
      });
  </code></pre>