title: Animating sticky navigation?
body: <p>I'm trying to animate a sticky navigation - what I want to do is make it bounce in smoothly. How can I do that?</p>
  
  <p>I have the following .js script: </p>
  
  <pre><code>    var  mn = $(".menu");
      mns = "menu-scrolled";
      hdr = $('.menu').height() + $('.navigation').height();
  
      $(window).scroll(function() {
        if( $(this).scrollTop() &gt; hdr ) {
          mn.addClass(mns);
        } else {
          mn.removeClass(mns);
        }
      });
  </code></pre>
  
  <p>I'm using the following code as a reference: <a href="http://codepen.io/Guilh/pen/JLKbn" rel="nofollow">http://codepen.io/Guilh/pen/JLKbn</a></p>