There’s some tabular data to be displayed with Sorting possible by the headers. I’m using Table Sorter plugin for this. Each row also has a collapsible panel which opens/ closes just below each row. Currently I have implemented these panels as <tr> elements which are shown/ hidden by jQuery. However, this implementation leads to sorting of these panels as well when Table sorter sorts the columns.
What can be the alternate approach to displaying the collapsible panel just below each row?
The HTML specs allows multiple
tbodys inside a table. I think you should be using 1tbodyfor each row (which can have more than 1tr).Also, the Tablesorter plugin is not implemented correctly. Try using it’s fork instead – https://github.com/renatoalbano/jquery-tablesorter/
Ref : https://developer.mozilla.org/en/HTML/Element/table