I\'m looking for something to this effect:
$(window).scroll(function(event){ if (/* magic code*/ ){ // upscroll code } else { // downscrol
This is simple and easy detection for when the user scrolls away from the top of the page and for when they return to the top.
$(window).scroll(function() { if($(window).scrollTop() > 0) { // User has scrolled } else { // User at top of page } });