Guest User

Untitled

a guest
Jan 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <script>
  2. $(document).ready(function(){
  3. $(window).scroll(function(){
  4. var position = $(window).scrollTop();
  5. var bottom = $(document).height() - $(window).height();
  6. if( position == bottom ){
  7. var row = Number($('#row').val());
  8. var allcount = Number($('#all').val());
  9. var rowperpage = 3;
  10. row = row + rowperpage;
  11. if(row <= allcount){
  12. $('#row').val(row);
  13. $.ajax({
  14. url: 'fetch_pages.php',
  15. type: 'post',
  16. data: {row:row},
  17. success: function(response){
  18. $(".col-md-3:last").after(response).show().fadeIn("slow");
  19. }
  20. });
  21. }
  22. }
  23. });
  24. });
  25. </script>
Add Comment
Please, Sign In to add comment