1

I have 2 columns, One holding dates and the other event names. I'm trying by default to sort Dates first (in ascending order) then the event names in ascending order. Is that possible with this plugin?

My sort list

sortList: [[3,0],[1,0]]

Does sort the dates column (3) but then it doesn't sort the even name column accordingly. If it's not clear (because I'm having a hard time trying to find good describing keywords to search :/ ) I want to sort the results of the original sort.

Sort Date Ascending

Then with the date still in Ascending Order, sort Event Names in Ascending Order.

4

1 回答 1

0

3当只有两列时,我不确定日期列的索引(从零开始的索引,所以它实际上是表中的第四列),但是......

试试这个sortForce选项。它在对任何其他列进行排序之前强制(预先设置)目标列的排序:

$('table').tablesorter({
    sortForce : [[ 3,0 ]], // date column
    sortList  : [[ 1,0 ]]  // event column (user can still sort this descending)
});
于 2013-09-13T22:50:17.823 回答