Hi is there a way to check if there is a way to check mousewheel event up or down without checking where it last scrolled. As I have disabled my scrolling and used animate instead of scroll.
var currentTop = 0;
var scrolling = false;
var allowNextAnimation = true;
$('.contactDiv').on('scroll touchmove mousewheel', function(e){
if (!scrolling && allowNextAnimation) {
if (scrollTop)
currentTop = currentTop + 70;
else if (scrollDown)
currentTop = currentTop - 70;
scrolling = true;
$('.contactDiv').animate({
scrollTop: currentTop
}, 500, function(){
scrolling = false;
allowNextAnimation = false;
});
return false;
}
allowNextAnimation = true;
});
I need some way to know if the mouse scrolls up or down without knowing where scrollTop is. Any advice?