title: Swap classes after resizing the window
body: <p>I am trying to swap the class when the browser get's resized. </p>
  
  <pre><code>    $(window).resize(function() {
          if($(window).width() &gt; 768) {
              $('.toggle-menu').addClass('menu-right');
              $('.toggle-menu').removeClass('menu-top');
          }
          if($(window).width() &lt; 768){
              $('.toggle-menu').addClass('menu-top');
              $('.toggle-menu').removeClass('menu-right');
          }
      }
  </code></pre>