Creates 2 new events for window to be listen: scrollup and scrolldown
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="jquery.advancedScroll.js"></script>
<script>
$(window).advancedScroll();
</script>
$(window).on({
scrollup: function() { /* do something */ },
scrolldown: function() { /* do something */ }
});
Please check jquery.advancedBreak