Sortable Tables, with color
S.L. @ Kyrogrenix's sorttable.js is a remarkable piece of work. I had been working on a similar bit of code, but recycled those bits as soon as I tried it.I've incoporated the function into Uzilla as well as several other applications and it works like a charm in a beautifully unobstrusive fashion. However, it's not compatible with server side alternating row colors, as when the rows get shuffled, the colors are all mucked. Enter sorttable_colored.js, a merging of my js alternating row colors with sorttable.js.
The new version is not as optimized as it could be... patches accepted and republished.
A few tips for using the sortable.js script in general:
- If your columns have numeric data, avoid spaces to get numeric sorting.
- Missing cells, particularly in the early rows can cause problems.
- The caption tag is a great alternative to a rowspanned table cell and is ignored by sorttable and alternateRowColors
Posted at 18:45