Is there a way in javascript to detect when the user scrolls up or down rather then when the user scrolls?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1222915/can-one-use-window-onscroll-method-to-include-detection-of-scroll-direction">Can one use Window.Onscroll method to include detection of scroll direction?</a>  </p>
</blockquote>



<p>I am experimenting with scrolling and was wondering if there is a way to detect if a user is scrolling up or down on the page using Javascript (or the jQuery library). I do not want to detect scrolling in general, just which direction the user is scrolling (up or down). </p>
