July 17, 2013 8:21 am

How to Integrate jQuery Scroll Paging with PHP

I have received many request from my readers that how to load page on scroll down like now days many websites doing specially Facebook and Twitter so i have decided to write this helpful article. It uses jQuery and php to load page on scroll down, we have 2 pages one for first time load and second page can be loaded on scroll.


jQuery Code:

Offset: used to get numbers of records you want to fetch on each scroll down.

TotalRecordsCount: used for the limit of records shown on scroll down.

Data: can be used on your needs or it should be blank.

BeforeSend: your code needs to be executed before each request.

Download source of this tutorial and have implemented on you websites.

Author Huzoor Bux

I am Huzoor Bux from Karachi (Pakistan). I have been working as a PHP Developer from last 5+ years, and its my passion to learn new things and implement them as a practice. Basically I am a PHP developer but now days exploring more in HTML5, CSS and jQuery libraries.

Tutorial Categories:
  • where did you update the offset on every load of new set, and then submit back to server?

    • Huzoor Bux

      We are updating offset in file on this code
      if(settings.data == null || settings.data == ”){
      data = ‘offset=’+settings.offset
      data = settings.data+’&offset=’+settings.offset

      • Max John

        I have noticed that the offset increases from two to two which means for example 2, 4, 6 at each scroll. Is there a way to make it increase from 1 to two ?
        Also how do we pass the last id displayed on the page to the content.php page ?

  • Karcsi Hal

    great and nice job. the best side for lerning this technologies.


  • Vishnu Priya

    nice article,thanks for letting to know how to integrate jQuery scroll paging with php.To find more php projects Click here to know more about php projects.

  • how can I download it?

  • Rahul Roy

    thank you for this tutorial.. can you tell us how can i use it with PHP. when fetching data from sql..
    (I am actually fetching data from SQL database using PHP and repeatingly printing a div with contents using a while loop)

  • Max John

    Huzoor Bux, Huzoor Bux, Huzoor Bux. You my friend are the BEST !!! You know that ?!!!!! Yeaaaaah ! Thank you sir !!!!