check if user scroll top or bottom
var lastScrollTop = 0, delta = 5;
$(window).scroll(function () {
var nowScrollTop = $(this).scrollTop();
if (Math.abs(lastScrollTop - nowScrollTop) >= delta) {
if (nowScrollTop > lastScrollTop) {
// SCROLLING Down
} else {
//scroll top
}
lastScrollTop = nowScrollTop;
}
});