Javi

HTML5: Infinite scroll with jQuery

Nov 17th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     $(document).ready(function() {
  2.         var count = 0;
  3.         $(window).scroll(function(){
  4.             if  ($(window).scrollTop() > $(document).height() - window.innerHeight- 20) {
  5.                $('body').append($('<p>').text(count + ' ' + lorem));
  6.                count = count + 1;
  7.             }
  8.         });
  9.     });
Advertisement
Add Comment
Please, Sign In to add comment