2011-10-20 16 views

回答

6

你已經錯過了,這裏是代碼:

$(document).ready(function() { 
    $("table").tablesorter({ 
     // pass the headers argument and assing a object 
     headers: { 
      // assign the secound column (we start counting zero) 
      1: { 
       // disable it by setting the property sorter to false 
       sorter: false 
      }, 
      // assign the third column (we start counting zero) 
      2: { 
       // disable it by setting the property sorter to false 
       sorter: false 
      } 
     } 
    }); 
}); 

unsortable columns

+0

謝謝你這麼多zdrsh :) – pufAmuf

5

您將需要使用headers選項,以使某些列未排序。

$(document).ready(function() { 
    $("table").tablesorter({ 
     // pass the headers argument and assing a object 
     headers: { 
      // assign the secound column (we start counting zero) 
      1: { 
       // disable it by setting the property sorter to false 
       sorter: false 
      }, 
      // assign the third column (we start counting zero) 
      2: { 
       // disable it by setting the property sorter to false 
       sorter: false 
      } 
     } 
    }); 
}); 

我希望這有助於!

+0

它當然DSQUARED :)! – pufAmuf

2

這是正確的,在大桌子的headers選項頁面上,你掛下:

的指令,每列控件格式的對象: headers: { 0: { option: setting }, ... }例如,要禁用 排序表上的前兩列:headers: { 0: { sorter: false}, 1: {sorter: false} }