jquery - 在 tablesorter 中更新可调整大小的宽度

标签 jquery css plugins tablesorter resizable

在设置 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/

相关文章:

php - 在数据库中保存评级

Javascript 继承最佳策略

html - 如何从 <table> 中删除默认空间?

css - 如何防止调整浏览器大小时内容跳起来?

javascript - 检测失焦击键,聚焦输入并填写(Jquery)

javascript - 如何从下到上迭代子元素

javascript - 在 IE 上使用 CKEditor 插件获取选定的文本

plugins - 插入不可编辑元素后的CKEditor光标位置

javascript - 如何使用 javascript 以网格格式(行和列)动态添加按钮?

jquery - Slick 插件 - div 上的固定高度和自动宽度导致未定义的幻灯片宽度