joequery/Stupid-Table-Plugin — pull request #77 by Cylix (2013-10-25 14:44:14+00:00)
Title: Default table sort

In my application, I would like to remember the last table sort. When the user will come back to the table page, it will display the table with the latest sort.

With the current Stupid-Table-Plugin code, this is not possible. So, I've added this functionnality.

Here is the usage:

Sometimes, you'll want to set a default sort for your table (for example, when you want to remember the last user session sort).

You just need to add an `data-default-sort-th="id_of_the_th"` attribute to the table.

For example, the following code will sort the table by Email ASC:

Name
Email

Joseph McCullough
joseph@mail.com

Justin Edwards
justin@mail.com

...
...
...