title: Transition when adding class
body: <p>How to apply Transition when adding and remove class on this scroll js <em>below:</em></p>
  
  <pre><code>lastScroll = 0;
  $(window).on('scroll',function() {    
      var scroll = $(window).scrollTop();
      if(scroll === 0){
          $(".header").removeClass("shrink");
      } else if(lastScroll - scroll &gt; 0) {
          $(".header").addClass("shrink");
      } else {
          $(".header").removeClass("shrink");
      }
      lastScroll = scroll;
  });
  </code></pre>
  
  <p>Trying to add this <code>({'transitionTime': 200})</code> when add and remove class.</p>
  
  <p>Main Fiddle: <a href="http://jsfiddle.net/9fbr320y/1/" rel="nofollow">http://jsfiddle.net/9fbr320y/1/</a> <br>
  Example Here: <a href="http://www.jqueryscript.net/demo/jQuery-Plugin-To-Hide-Sticky-Navbar-When-Scrolling-Down-Scroll-Up-Menu/" rel="nofollow">Link</a> >></p>