I\'m looking for something to this effect:
$(window).scroll(function(event){ if (/* magic code*/ ){ // upscroll code } else { // downscrol
Check current scrollTop vs previous scrollTop
scrollTop
var lastScrollTop = 0; $(window).scroll(function(event){ var st = $(this).scrollTop(); if (st > lastScrollTop){ // downscroll code } else { // upscroll code } lastScrollTop = st; });