Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tempScrollTop, currentScrollTop = 0;
- $(document).scroll(function(){
- currentScrollTop = $(document).scrollTop();
- if (tempScrollTop < currentScrollTop ){
- //scrolling down
- }
- else if (tempScrollTop > currentScrollTop ){
- //scrolling up
- }
- tempScrollTop = currentScrollTop;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement