Updating jQuery Tablesorter plugin after removing a row from DOM

前端 未结 7 636
迷失自我
迷失自我 2020-11-30 07:40

I have some code at the moment that hides a row that is deleted and then removes it using the .remove() function.

However I\'m having difficulty is making it remain

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 08:17

    This seems an odd approach, but actually it worked for me. Table renders fine and pager works properly.

    $("#tabeBodyId").empty();
    $("#tableId colgroup").remove();
    
    //Update table(done using Ajax)
    $("#tableId").tablesorter({widthFixed: true}).tablesorterPager({container: $("#pager")}); 
    

提交回复
热议问题