Getting jQuery tablesorter to work with hidden/grouped table rows

前端 未结 4 1200
长发绾君心
长发绾君心 2020-12-09 05:42

I have the classical table with expandable and collapsible records that if expanded show several subrecords (as new records in the same parent table, not some child div/chil

4条回答
  •  执念已碎
    2020-12-09 05:55

    Ugly fix instead of using the above involves specifying parentId css class and childId css class for parent and child rows, and then using a widget to re-adjust. Just in case anyone else runs across this problem. It is clearly not the best code at all, but it works for me!

    $("tbody tr[class^='parent']", table).each(function() {
     $(this).after($("tbody tr[class^='child"+$(this).attr("class").substring(6)+"']", table));
    });
    

提交回复
热议问题