Skip to content

Erencan1/sortable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d7d1666 · Jul 29, 2018

History

6 Commits
Jul 29, 2018
Jul 18, 2018
Jul 18, 2018
Jul 18, 2018
Jul 18, 2018

Repository files navigation

sortable

Make HTML table interactive and sortable Check out table.js, it is easily customizable

    var example_sortingFunction = function (row) {
        var total = parseInt(row.cells[2].innerHTML) + parseInt(row.cells[3].innerHTML)
        var minutes = parseInt(row.cells[4].innerHTML)
        return -total/minutes;
    };

    stage({
        'table_id': 'exp_table_id', // HTMLTableElement id,
        'row_counter': 6, // row number to display on one page,
        'sortingFunction': example_sortingFunction, // leave null, if sorting is not needed when page is loaded
    });