0
我一直在试图让一些div徘徊低于我的头有复选框,在我有这个工作: Jsfiddle哈弗的下拉列表中不工作的多个列
initComplete: function(settings, json) {
let api = new $.fn.dataTable.Api(settings);
let header = api.column(0).header();
let originalText = $(header).text();
let newText = originalText + `<div class="filterOptions" id="FilterStatus">
<input type="checkbox" id="Status1" data-status="1">
<label for="Status1">1</label>
<input type="checkbox" id="Status2" data-status="2">
<label for="Status2">2</label>
<input type="checkbox" id="Status3" data-status="3">
<label for="Status3">3</label>
<input type="checkbox" id="Status4" data-status="4">
<label for="Status4">4</label>
</div>`;
$(header).html(newText).attr("id", "hover")
}
然而,当我尝试采用同样的到第二个标题,只有最后一个标题似乎应用了下拉列表: Jsfiddle
我曾尝试过,但没有在第二遍中更改变量名称!干杯 – BN83
很高兴帮助:) – Vaidas