Once included into the page, there's the Scrolling object available.
- To get the actual scroll position: Scrolling.pos()
- To get the scrolled direction: Scrolling.dir()
Bower: bower install jquery.scrolling
NPM: npm i @marcandreappel/jquery.scrolling