I am using the jQuery tablesorter plugin. I am wanting to store how a user has sorted the table on the page and automatically sort that way the next time the page loads. To do this, I first need to be able to find the sortList object that stores how the table is sorted. For the life of me I cannot figure out how to get it. The documentation doesn't seem to have anything on this and I've tried everything I can think of.
You need to bind your table element to the tablesorter sortEnd
event. All the data for that object is passed in to the handler. You can then get the current sort like so:
var currentSort;
$("#yourtableId").tablesorter({
// initialization
}).bind("sortEnd", function(sorter) {
currentSort = sorter.target.config.sortList;
});