Given a table with a structure of:
<table>
<thead>
<tr>
<th>Click Me!</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sortable Values!</td>
</tr>
</tbody>
</table>Initialize the plugin on your table like so:
$('table').sortme();##Additional options If your date is pre-sorted server side, you can initialize the plugin with the following options
| Field | Description |
| serverSortedColumn | The selector for the presorted column |
| serverSortedAsc | (optional, defaults to false) The direction of the sort |
| sortElementSelector | (optional, defaults to 'tbody tr') The selector for the elements to sort |
| viewUpdater | (optional, defaults to using build in remove/append logic) The function used to update the view |
var opts = {
serverSortedColumn: 'th.server-sort',
serverSortedAsc: false
};
$('table').sortme(opts);