I know this might seem primitive, but I\'ve been trying to implement it for a whole day, maybe because I can\'t fully comprehend how to use the API, I\'m using DataTables 1.
This should work for you
var table = $('#numbers_table').DataTable(); $('#checkall').click(function () { $(':checkbox', table.rows().nodes()).prop('checked', this.checked); });