Datatables 1.10,
<div class="row text-center">
<table class="table table-condensed table-subscribers-per-discipline">
<thead>
<tr>
<th class="text-center">Select</th>
<th class="text-center">Discipline</th>
<th class="text-center">Count</th>
</tr>
</thead>
<tbody>
<?php
foreach ($this->subscribersPerDiscipline as $row) { ?>
<tr>
<td>
<label for="count"></label>
<input onClick="document.getElementById('theSubmitButton').click();" id="count" type="checkbox" data-value="<?= $row['subscribers_per_discipline_count'] ?>" value ="<?= $row['id'] ?>"/>
</td>
<td><?= $row['discipline_name'] ?></td>
<td><?= $row['subscribers_per_discipline_count'] ?></td>
</tr>
<?php } ?>
</tbody>
</table>
<input class="btn btn-success" style="display: none" type="button" id="theSubmitButton" value="Check"/>
</div>
$(document).ready(function() {
$('.table-subscribers-per-discipline').DataTable({
bInfo: false,
pagingType: 'simple',
bPaginate: true,
bLengthChange: false,
"aaSorting": [ [2, 'desc'] ],
"aoColumns": [
{
"bSortable": false
},
{
"bSortable": true
},
{
"bSortable": true
}
]
});
});