【发布时间】:2021-01-05 06:33:22
【问题描述】:
我想更改制表符行选择列中的复选框样式。我正在为 CSS 使用引导程序 4。我正在尝试通过 jquery 将自定义 css 类添加到复选框,但没有运气。
var table = new Tabulator("#job_openings_table_wrapper", {
data: tableData,
selectable: true,
height: "420px",
pagination: "local",
paginationSize: 10,
paginationSizeSelector: [10, 20, 50, 100],
footerElement:
"<div id='record-count-container' class='table-footer-element'><label>Total Records:</label><span id='record-count' class='ml-1'>#</span></div><div id='selected-record-count-container' class='table-footer-element'><label>Selected:</label><span id='selected-record-count' class='ml-1'>#</span></div>",
dataFiltered: update_record_count,
dataLoaded: update_record_count,
rowSelectionChanged: update_selected_record_count,
rowContextMenu: rowContextMenuBuilder,
columns: [
{
formatter: "rowSelection",
titleFormatter: "rowSelection",
align: "center",
headerSort: false,
},
{ title: "Job ID", field: "job_id" },
{ title: "Position", field: "position" },
{ title: "Employment Type", field: "employment_type" },
{ title: "Hiring Department", field: "hiring_department" },
{ title: "Created On", field: "created_on" },
{ title: "Status", field: "status" },
],
});
$(":checkbox").wrap("<div class='custom-control custom-checkbox'></div>");
$(':checkbox').addClass('custom-control-input');
【问题讨论】:
标签: tabulator