I have an HTML table with about 100 rows and 3 columns. I have onclick events attached to all 3 of my column headers. What must I do in Javascript to easily sort the table by that column? I can think of a fully blown hand-written approach, but I'm not sure if there are any built-in functions for such a seemingly common operation.
If I have to do this by hand, I'd probably sort the array I used to generate the table in the first place, and simply re-create the table after the sort. Any advice?