title: jQuery ScrollTop() function animation menu
body: <p>I have a little problem, I try to use jquery for create animation in my navbar.
  My navbar animation it's like this : <a href="http://www.vogue.fr/?international" rel="nofollow">http://www.vogue.fr/?international</a> 
  But my problem it's the animation start only when i'm at the top of page. 
  But I need the animation begins when the user scroll up or scroll down from anywhere. </p>
  
  <p>My Jquery code : </p>
  
  <pre><code>$(document).ready(function () {
   $(window).scroll(function() {
     if ($(document).scrollTop() &lt; 1) {
      $('nav').addClass('navYolo');
      $('nav').removeClass('navYo');
      $( "ul" ).show();
   } else {
      $('nav').removeClass('navYolo');
      $('nav').addClass('navYo');
      $( "ul" ).hide();
      }
    });
  });
  </code></pre>
  
  <p>If someone can help me. Thanks a lot!</p>