Using jQuery tableSorter on dynamically modified table

Alex picture Alex · Oct 29, 2008 · Viewed 22.2k times · Source

I am using the jQuery tableSorter plugin on a page.

Unfortunatley, the table that is being sorted is dynamically modified, and when I sort after adding an element, the element disappears, restoring the table to the state that it was in when the tableSorter was created.

Is there any way that i can force tableSorter to rescan the page so that these new elements are sorted properly?

Answer

Josh picture Josh · Oct 29, 2008

I believe you can trigger an update using something like:

$(table).trigger("update")