Skip to content

jtuttle87/jquery.sortme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

jquery.sortme

Simple Usage

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);

About

super simple jquery plugin for making table rows sort-able by content

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published