I\'m looking for something to this effect:
$(window).scroll(function(event){ if (/* magic code*/ ){ // upscroll code } else { // downscrol
You can use both scroll and mousewheel option to track up and down movement at once.
$('body').bind('scroll mousewheel', function(event) { if (event.originalEvent.wheelDelta >= 0) { console.log('moving down'); } else { console.log('moving up'); } });
You can replace 'body' with (window) as well.