Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(document).ready(function(){
- $(window).scroll(function(){
- var position = $(window).scrollTop();
- var bottom = $(document).height() - $(window).height();
- if( position == bottom ){
- var row = Number($('#row').val());
- var allcount = Number($('#all').val());
- var rowperpage = 3;
- row = row + rowperpage;
- if(row <= allcount){
- $('#row').val(row);
- $.ajax({
- url: 'fetch_pages.php',
- type: 'post',
- data: {row:row},
- success: function(response){
- $(".col-md-3:last").after(response).show().fadeIn("slow");
- }
- });
- }
- }
- });
- });
- </script>
Add Comment
Please, Sign In to add comment