title: jQuery Toggle Menu
body: <pre><code>$(window).on('resize', function() {
      if ( $( window ).width() &gt; 768 ) {
          $('#menu-main-navigation').show();
      } 
  });
  
  $('#nav-toggle').on('click', function() { // start of the nav toggle
      $('#menu-main-navigation').slideToggle('slow');
  });
  </code></pre>
  
  <p>i currently have the above code, works fine on page load but if you open the toggle and close it, when you resize the window above 768px it defaults to open no matter what state the menu was left in below the cut off point. </p>
  
  <p>how can i get it to be always what the toggle menu is? and obviously show the menu every time above 768px?</p>