使用包含大量数据的tablesorter插件

So I currently have a set of data that is about 5000 records. I have been using the tablesorter plugin and it has worked great for my smaller tables.

however the way I have it set up currently on the page with the large amount of records is that it retrieves all the records from the database and populates the data into the browser and then the tablesorter plugin with break it into pages of 100 records.

my issue is that the I need to get it working in a way where it will load up the first 100 records and have it so it doesn't load the next 100 records until I hit the next page button. But I still have to be able to sort through all 5000 records if I sort by any of the headers.

I am some what new to working with this so I am not sure how I could go about doing that.

so to summarise

I have 5000 records

I want to have 100 of those records display when the page loads

if I sort by any of the headers it needs to sort through all 5000 records

if I hit the next page button it needs to load up the next 100 records in line.

You should give datatables a try then.

Tablesorter has a pager plugin that can handle server side paging requests. Here's a link to the example:

http://mottie.github.io/tablesorter/docs/example-pager-filtered.html

You can run ajax requests that will handle that pagination, as well as sorting and filtering. However, you'll have to build the calls to the server. The process is pretty well documented in the documentation on Mottie's Tablesorter fork. I recently used Tablesorter to handle a table with 50,000 rows.