How can I determine the direction of a jQuery scroll event?
<p>I'm looking for something to this effect:</p>

<pre><code>$(window).scroll(function(event){
   if (/* magic code*/ ){
       // upscroll code
   } else {
      // downscroll code
   }
});
</code></pre>

<p>Any ideas?</p>
