在页面加载时,我像这样初始化tablesorter:
$('#tableId').tablesorter({
// sort on the first column, order asc
sortList: [[5,1]],
cssDesc: "headerSortDownFan",
cssAsc: "headerSortUpFan",
cssInfoBlock : "tablesorter-no-sort",
headers: {
".sortingDisabled": {
sorter: false
}
},
// apply custom widget
widgets: ['numbering']
});
然后在点击事件中我用以下内容销毁它:
$('#tableId').trigger("destroy");
当我再次通过调用以下内容重新初始化时:
$('#tableId').tablesorter({
// sort on the first column, order asc
sortList: [[5,1]],
cssDesc: "headerSortDownFan",
cssAsc: "headerSortUpFan",
cssInfoBlock : "tablesorter-no-sort",
headers: {
".sortingDisabled": {
sorter: false
}
},
// apply custom widget
widgets: ['numbering']
});
tableorter不再有效 任何帮助将不胜感激