Tablesort is a small and simple sorting component for tables written in Javascript. It has no dependencies and should have no interference with other libraries.
<script src='tablesort.min.js'></script>
<script>
new Tablesort(document.getElementById('table-id'));
</script>
- Sort strings
- Sort numbers
- Sort currency
- Basic date sorting: either the
dd/mm/yy
format, or '{month} {day}', e.g. "Sept 25".
Add tablesort
as an internal chain method to your Ender compilation.
$ ender add tablesort
Use it:
$('.table').tablesort();
Developers can rebuild the minified library by running:
npm install --dev
make
- Tests
- Pass in an options object to:
- Choose which row to begin sorting on.
- Column exclusion
- EventListener to rebuild the table.