jQuery tablesorter 2.0, resorting table after values change
I need to re-sort a table when the input elements in cells change in value. I've already created custom sorters for my data, which works wonderfully, but now I need to re-sort when data changes.
$('#id').tablesorter(...)
almost does what I need, but it seems to apply ANOTHER set of sorting on a given开发者_StackOverflow中文版 table, which leads to really weird behavior. Is there a way to completely redo the tablesorting action, or at least for the table to resort based on new information?
From building the custom parser, I see that tablesorter builds the formatted columns and stores it internally once when the page loads, and I need to modify this behavior such that I can resort on $('#id input').change
.
Any ideas? The documentation for this plugin is weak, although it is a great plugin.
i think what you need to do is trigger an update.
$("#tableId").trigger("update");
that's what i'm doing to make my tables resort.
i agree with you the documentation for this plugin is weak as best.
Are you referring to:
$("#id").trigger("update");
精彩评论