title: Animate addClass and removeClass in Jquery
body: <p>I Have a simple code that removes a class when a div is clicked. What i am looking for is that rather than just showing when the div is clicked, can I make it slide in from left to right?</p>
  
  <pre><code>$(document).scroll(function() {
    var y = $(this).scrollTop();
    if (y &gt; 140) {
      $('#primary-menu-container').addClass("hide-nav-fixed");
    } else {
      $('#primary-menu-container').removeClass("hide-nav-fixed");
    }
  });
  </code></pre>