JQuery tablesorter problem

前端 未结 6 2007
孤城傲影
孤城傲影 2021-02-01 07:13

I\'m having a couple of problems with the JQuery tablesorter plugin. If you click on a column header, it should sort the data by this column, but there are a couple of problems:

6条回答
  •  醉话见心
    2021-02-01 08:06

    I would suggest using some Javascript to remove the last row from the table. Add a footer and then re-add the removed row from the table. To solve the issue with empty data in a numeric cell you may need to add your own custom parser.

       $(function() {
           $('#communityStats').append("");
           $('#communityStats > tr:last').remove()
                                         .appendTo('#communityStats > tfoot');
           $('#communityStats').tablesorter();
       });
    

提交回复
热议问题