【发布时间】:2017-09-02 13:44:20
【问题描述】:
我正在使用 DataTables 和 responsive 并在尝试仅显示某些列时遇到问题。
我只需要显示'Column 1', 'Column3', 'Column 7', 'Column 8', 'Column 10'并隐藏其他人(这些应该通过每行末尾的展开控件显示)。
JS:
$( 'table' ).DataTable( {
order: [ [ 0, "asc" ] ],
responsive: {
details: {
type: 'column',
target: 'tr'
}
},
columnDefs: [ {
className: 'control',
orderable: false,
targets: -1
} ]
} );
这是JSFiddle。有什么建议!
【问题讨论】:
标签: jquery datatables datatables-1.10