I\'m designing a very simple web page (HTML only), the only \"feature\" I want to implement is to do something when the user scrolls down the page, is there a way to capture
var previousPosition
$(window).scroll(function(){
var currentScrollPosition=$(window).scrollTop() + $(window).height()
if (currentScrollPosition>previousScrollPosition) {
console.log('down')
}else if(currentScrollPosition