jQuery tablesorter + 调整列宽

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/671791/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 09:33:30  来源:igfitidea点击:

jQuery tablesorter + resizing column widths

jqueryresizetablesorter

提问by Bob Walsh

Is there a jQueryplugin for resizing table columns that works with tablesorter?

是否有用于调整与 tablesorter 一起使用的表列大小的jQuery插件?

回答by Bob Walsh

It looks like Flexigridhas everything you may want.

看起来Flexigrid拥有您想要的一切。

回答by Alvaro Prieto Lauroba

You should try the colResizableplugin. It allows to resize columns manually, and it is tiny in size (2.8 KB) and does not require any other libraries or stylesheets.

您应该尝试colResizable插件。它允许手动调整列的大小,并且它的大小很小(2.8 KB)并且不需要任何其他库或样式表。

回答by RobAu

A very easy plugin for adding resizable columns is SimpleResizableTable.js.

添加可调整大小列的一个非常简单的插件是SimpleResizableTable.js

回答by John Boker

It looks like jquery.kiketable.colsizablewould work for what you need.

看起来jquery.kiketable.colsizable 可以满足您的需求。

Another one that looks good is Ingrid, the jQuery Datagrid. It has more features and will sort your columns without the use of tablesorter.

另一个看起来不错的是Ingrid,即 jQuery Datagrid。它具有更多功能,可以在不使用 tablesorter 的情况下对您的列进行排序。

回答by kevink

If you don't find a plugin for tablesorter, the jQuery Grid Plugin(still in alpha) does resize columns.

如果您没有找到 tablesorter 的插件,jQuery Grid Plugin(仍处于 alpha 阶段)确实会调整列的大小。

回答by Ingo

It is possible to use the jQuery UI Resizable plugin to resize columns. The plugin can not directly resize TH elements, but even better COLGROUP > COL elements which makes the browser rendering very fast and enables proper HTML.

可以使用 jQuery UI Resizable 插件来调整列的大小。该插件不能直接调整 TH 元素的大小,但更好的 COLGROUP > COL 元素使浏览器呈现非常快并启用正确的 HTML。

Some more evaluation, a live demo and complete code can be found in the blog post Resizable Table Columns with jQuery UI.

更多评估、现场演示和完整代码可以在博客文章Resizable Table Columns with jQuery UI 中找到