在设置 tablesorter 的 resizable_width 时遇到问题。我想用可调整大小的小部件以编程方式更新 tablesorter 列的宽度。 我用过
$("#tableId")[0].config.widgetOptions.resizable_widths = [
'20%', '10%', '10%', '70%'
];
$("#tableId").trigger("updateAll");
但调整大小功能已被删除。
谢谢。
最佳答案
正如我在 the opened issue 中分享的那样:
I've had issues with the resize widget not working well after an "updateAll". Is there a reason why "updateAll" is being used? To update the widget, you only need to trigger
applyWidgets
on the table.$("#tableId")[0].config.widgetOptions.resizable_widths = [ '20%', '10%', '10%', '70%' ]; $("#tableId").trigger("applyWidgets");
关于jquery - 在 tablesorter 中更新可调整大小的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38357448/