sortTable is a simple JS script to sort data from an
HTML
table in an Ascending and Descending way. You can use it to sort names, numbers, dates, and currency.
Add the sortTable.js
to the <head>
of your HTML
file. It's necessary that your project is using jQuery. In its HTML
file it makes a call to sortTable.js
as follows:
jQuery(document).ready(function() {
var table = new ScriptOrderTable();
table.queryTableColumns('#myTable', 'thead td a');
});
See the sortTableExample.html
file for an example of how to use the script.