title: differentiate scroll down and scroll up
body: <p>I am developing an infinite scroll functionality. It works fine, the only issue is the ajax loading is happening when scroll down as well as scroll up. How to check the event is scroll down in jquery or javascript. How to get the current scroll position. Please help</p>