JQuery Tablesorter clear table information

Posted by conversoid on Stack Overflow See other posts from Stack Overflow or by conversoid
Published on 2012-12-15T17:01:07Z Indexed on 2012/12/15 17:03 UTC
Read the original article Hit count: 169

Filed under:
|

I've created a jquery table that from time to time needs to be cleared and the re-populated, my clear method is this:

//Clear table content before repopulating values
$('#tabela_dash2_maquinas .real-content table tr:gt(0)').remove();

Now i'm trying to use tablesorter to sort a specific column, but my problem is that when I enable the tablesorter:

//Initialize tablesorter
$("table").tablesorter();

The table clearing method is not working anymore, it just keeps adding the new data with the old data, creating a lot of repeated information.

Please help

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about tablesorter