I tried to search and get this link Making jQuery Pagination , but in this tutorial is for the static content. But for me, I use JSON to retrieve data that my controller query. Then I take the result of the JSON, list in the table, div and span. In my table there are many rows, so I want to do it as pagination.
Could anyone show me some clues about this issues? Thanks in advanced.
All of these request will be ajax call.
For displaying you can choose multiple option:
Have one div for every say given records like 10, 20 and then on prev next you can move also give them id as page number so that you can easily identify the page you are in.
Add new rows in your table this would require more effort IMHO.
Don’t hit database for every next, prev database resources are limited, instead fetch extra rows (depending on the use case) and keep it in memory.