sortera
Sortera is a standalone, minimalistic yet powerful, javascript library that makes any HTML-table interactively sortable.
Highligts
- Small footprint
- Highly optimized code
- Not relying on any third party libraries of any kind
- Multi column sorting
- Adapts to the application, supporting the following techiques
- Stand-alone usage
- Registers itself as a jQuery-plugin if jQuery is present
- AMD export (Dojo Toolkit, RequireJS, ScriptManJS)
- CommonJS-style export
Sortera works by attaching events to the table headers of an existing table, hence your table need to have a html <thead> </thead>
section, or <th>
instead of <td>
for column headers. See example tables to the rights.
For full documentation, see hexagon.github.io/sortera
Examples
Standalone usage
// Example usage.var element = document; ;
For a full implementation and demo, see hexagon.github.io/sortera/examples/usage.standalone.html
As jQuery plugin
// Example usage, jQuery plugin mode.;
For a full implementation and demo, see hexagon.github.io/sortera/examples/usage.jquery.html
Installation
cdn
Copy and paste one of the following script tags.
Minified
Full
Manual
Bower
bower install sortera
npm
npm install sortera
License
MIT
( Just use it, I really don't care what you do with it. )