Reputation: 6688
I'm trying to incorporate a jQuery Pagination plugin for data that's been generated from PHP/MySQL.
My question is about the page load and which executes first. The jQuery is all in a $(document).ready(function()
and it doesn't seem to be interacting with the content that is loaded from the PHP/mySQL.
Which loads first, the PHP/MySQL or the jQuery? Is there a better AJAX way to accomplish the pagination?
Here's a fiddle of the plugin
Upvotes: 0
Views: 676
Reputation: 10537
You can either load your first data set with php/mysql (page 1) on the page prior to setting up the jquery pagination OR you can forgo with the initial page 1 of data loading and load the first page from an init ajax call afterwards.
related: Ajax Pagination with Jquery, PHP, Mysql
Upvotes: 1