joequery/Stupid-Table-Plugin — pull request #36 by svivian (2012-12-11 02:31:49+00:00)
Title: Fixed table sorting

Finally got around to doing this! I fixed the table sorting issues as discussed in #32.

When a column is sorted, the `data-sort-dir` attribute is set and is sorting ascending first. (Sibling columns have `data-sort-dir` reset.) If the column has been sorted then it reverses sorting.

I played around with that a little and surprisingly, just sorting in the opposite direction is a little slower than the reversal method, despite the number of calls to Array sorting/reversing/cloning functions using said method.