Tablesorter combining sortList with disabled columns

邮差的信 提交于 2019-12-14 03:10:42

问题


I feel sure this is a simple answer but as a rookie I'm failing to see it. I just want a table to have column 0 and 2 disabled from the sort, then the default sort to be column 1. Two separate commands, but while they work individually they seem to clash together. I can have my columns 0 and 2 disabled and the table works perfectly. Or I can have my initial sort set to column 2 and the table works perfectly. But when put together my remaining sortable columns will only allow one click, they cannot be toggled acending, descending.

Can anyone help, as I just can't figure out what I'm doing wrong? Thank you in advance!


回答1:


Try this demo:

$('table').tablesorter({

    sortList : [[ 1, 0 ]],
    headers : {
        0 : { sorter: false },
        2 : { sorter: false }
    }

});​


来源:https://stackoverflow.com/questions/11667572/tablesorter-combining-sortlist-with-disabled-columns

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!