Need Help with Jquery TableSorter Pager plugin.

Posted by chobo2 on Stack Overflow See other posts from Stack Overflow or by chobo2
Published on 2010-05-14T18:36:29Z Indexed on 2010/05/15 20:44 UTC
Read the original article Hit count: 740

Hi

I am using the tablesorter plugin: http://tablesorter.com/docs/ with jquery 1.4.2

Now my problem is this. The user can dynamically add rows to the table. But this seems to mess up the paging. Like first it gets added to the first "page" of rows but if you would go to the second page and you go back to the first page. You newly record is gone. I don't know where it goes but it is just gone.

I tried to do this

$('#pagerid').unbind('click');
 $('#tbl tbody ').append(response.HtmlRow);
 $('#tbl').trigger('update');

So I tried to unbind the pager click method and do a trigger update but that does not seem to work. I then tried to add this line after the above 3 lines.

$('#tbl').tablesorterPager({ container: $('#pagerid') }); 

but it seems to do nothing too.

http://tablesorter.com/docs/example-pager.html

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-plugins