DEV Community

John Ellee Robado
John Ellee Robado

Posted on

2 1

Pagination using AJAX and jQuery

Create a javascript file let say pagination.js

https://dev-to-uploads.s3.amazonaws.com/i/jf19thvskq3fxczkc4uz.PNG

Inside your page called notes.php, write this JavaScript code on the bottom

https://dev-to-uploads.s3.amazonaws.com/i/xyqamzvh22tj1tcitdh5.PNG

Now, this is the load_notes.php back end for AJAX

https://dev-to-uploads.s3.amazonaws.com/i/0ev6w1ikdr43m7mg7563.PNG

Summary

pagination(url,div_id,table_id,trigger,offset,limit) is to pagination('load_notes.php','load_here','notes','load_pagination','0','15')

Top comments (0)

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay