Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/giventofly/yet-another-js-table-sorter
A jquery plugin (one day vanilla js) to sort (number,text,date,..., implement your sort algorythm) rows of table (same table or different table)
https://github.com/giventofly/yet-another-js-table-sorter
javascript jquery sorting table
Last synced: 16 days ago
JSON representation
A jquery plugin (one day vanilla js) to sort (number,text,date,..., implement your sort algorythm) rows of table (same table or different table)
- Host: GitHub
- URL: https://github.com/giventofly/yet-another-js-table-sorter
- Owner: giventofly
- License: mit
- Created: 2018-02-06T13:45:35.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-15T16:11:18.000Z (almost 7 years ago)
- Last Synced: 2024-11-08T09:36:45.502Z (2 months ago)
- Topics: javascript, jquery, sorting, table
- Language: HTML
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yet-another-sort-table
* you can click on the header and sort.
$ todo:
a better faq/readme.include yajts.js, style.css and jquery in your html.
check index.html for an example.# configuration
* add to the table a class, and another class for the tbody.
* choose the sorting algorythim using data-sort="sort-function" in every td in the head you want to sort.# edit the object yajtsConf using this parameters:
* fixedColumns
number of columns to fix* you can add other methods to compare (date, text, number/values by default) by adding an object in the compareMethods
//this will not work, just a generic example
nameCompareFunction: function(param1, param2) {
return param1 - param2;
}* define table class to define
tableToSort = '.class'
* define class of table body
tableBodyClass = '.class';