Guest User

Untitled

a guest
May 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. var lastScrollTop = 0;
  2. $(window).on('scroll', function() {
  3. st = $(this).scrollTop();
  4. if(st < lastScrollTop) {
  5. console.log('up 1');
  6. }
  7. else {
  8. console.log('down 1');
  9. // getImages();
  10. }
  11. lastScrollTop = st;
  12. });
Add Comment
Please, Sign In to add comment