selector optional default table.sortableCSS selector for the table or tables to make sortable. Any selector works: a class (table.sortable), an id (#prices), or an element (table). The library attaches click-to-sort handlers to the column headers of every matching table.
options optional default (ignored)Reserved for a future JSON options string. The current version accepts it in the syntax but ignores it - sorting always uses the library defaults. Leave it out.
[{sortable}]
[{sortable:table.report}]
[{sortable:#prices}]
[{sortable:table.sortable:somejson}]
<table class="sortable"><tr><th>Name</th><th>Members</th></tr><tr><td>Alpha</td><td>14</td></tr><tr><td>Beta</td><td>42</td></tr></table>{sortable}
| Name | Members |
|---|---|
| Alpha | 14 |
| Beta | 42 |