header checkbox

This commit is contained in:
Corban-Lee Jones 2024-04-23 23:32:44 +01:00
parent 7be8bc936a
commit 12db49c4f7

View File

@ -21,7 +21,7 @@ function initSubscriptionTable() {
],
columns: [
{
title: "",
title: '<input type="checkbox" class="form-check-input" />',
data: null,
orderable: false,
className: "text-center",
@ -113,7 +113,7 @@ $("#subTable tbody").on("change", "tr td:first-child .form-check-input", functio
});
// Select all rows checkbox
$('#subTable thead td:first-child input[type="checkbox"]').on("change", function() {
$('#subTable thead th:first-child input[type="checkbox"]').on("change", function() {
var selected = $(this).prop("checked");
$('#subTable tbody tr').each(function(rowIndex) {
var row = subTable.row(rowIndex)