Sorttable.js is a pretty useful script for sorting data in tables. However, there are certain bits of data that I don't want to be sorted.
Therefore, what I'm looking for are functions which will remove specified table rows, sort the remaining rows (using sorttable.js), and then reinsert the removed rows into their proper place in the table.
Basically, in each table two rows represent one item - the first row has 4 individual pieces of information which is sortable. The second row (using a colspan across the table) contains data which is not sortable and must be removed before a sort, then replaced after the sort. The two rows can be tied together by similar ID parameters (for example, id="abcde" for the first row, and id="i-abcde" for the second row.
I suspect that using DOM may be the simplest way to do this.
Basically, the table has four columns for price, name, rating, and category, easily sorted with sorttable. The first row for each item contains this data. The second row might be considered as a description of the item.
Therefore, what I'm looking for are functions which will remove specified table rows, sort the remaining rows (using sorttable.js), and then reinsert the removed rows into their proper place in the table.
Basically, in each table two rows represent one item - the first row has 4 individual pieces of information which is sortable. The second row (using a colspan across the table) contains data which is not sortable and must be removed before a sort, then replaced after the sort. The two rows can be tied together by similar ID parameters (for example, id="abcde" for the first row, and id="i-abcde" for the second row.
I suspect that using DOM may be the simplest way to do this.
Basically, the table has four columns for price, name, rating, and category, easily sorted with sorttable. The first row for each item contains this data. The second row might be considered as a description of the item.
Comment