Closed brmenezewe closed 4 years ago
Yes. You can simply call sortTable
in a document load/ready event specifying the column number and direction. So long as you attach the event after you include SortTable, it should be ready to run. For example:
function _initialSort() {
sortTable(document.getElementById('demo3'), 1, -1);
}
window.addEventListener
? window.addEventListener('load', _initialSort, false)
: window.attachEvent && window.attachEvent('onload', _initialSort)
;
It works, thank you!
Hi, is it possible to set a specifc table column to be sorted by default on page load?