Tablesorter sortList错误?

时间:2015-02-24 13:47:44

标签: javascript tablesorter

Tablesorter sortList Malfunction?

为什么我不能用sortList设置初始列排序顺序?

$(function(){
  $("#myTable").tablesorter({ 
    sortList : [[4,1]], // initial sort columns (2nd and 3rd)
    cssInfoBlock : "tablesorter-no-sort"
  });
});

有谁可以告诉我为什么?

1 个答案:

答案 0 :(得分:0)

使用[[4,1]]将对第5列进行排序(它使用零基索引)。

请尝试使用此代码(demo):

$(function(){
  $("#myTable").tablesorter({
    sortList : [[1,1],[2,1]], // initial sort columns (2nd and 3rd)
    cssInfoBlock : "tablesorter-no-sort"
  });
});
相关问题