views:

21

answers:

1

Hi! I use the tablesorter 2.0, and I update the cells' value with ajax. After the call I would need to order again the rows, but the $('#thisTable').trigger('update') don't help me.

I dealing with markup inside cells, but it can't be problem.

 $('#thisTable').tablesorter({
   textExtraction: function(node) {
     return node.getElementsByTagName('input')[0].value; 
   }
 });

Any help would be appreciated.

-- Kree

A: 

You can find the answer in table sorter docs. You have to trigger another event sorton.

zrytane
Yes, I read it, but I don't know, which column was sorted before update... The sorton need the sort column(s) as parameters.
kree
Actual sort columns are stored in: $('#thisTable').get(0).config.sortList. If it is undefined than you can add some default sorting.
zrytane
Thank you! It was that, what I need! :)
kree