问题
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