table().container()
自:DataTables 1.10.1
在 API 的上下文中获取表格的 div
容器节点。
描述
DataTables 将表格和表格的所有各项组件显示控件放置在容器元素中,一个具有 div
元素的 dt-container
类(默认情况下)。
此方法及其复数对应方法提供了获取容器节点的能力,插件作者可使用该节点为表格添加其他控件。
类型
示例
向单个表格容器节点添加一个类
123var
table =
new
DataTable(
'#myTable'
);
$(table.table().container()).addClass(
'selectable'
);
相关
以下选项直接相关,在您的应用程序开发中也可能有用。
Post new comment
Contributions in the form of tips, code snippets and suggestions for the above material are very welcome. To post a comment, please use the form below. Text is formatted by Markdown.
To post comments, please sign in to your DataTables account, or register:
Any questions posted here will be deleted without being published.
Please post questions in the Forums. Comments are moderated.