DataTables & Check All

DataTables & Check All

SleighSleigh Posts: 1Questions: 0Answers: 0
edited November 2011 in General
I've been working on it forever, and still can't figure it out, I was reading this post:
datatables.net/forums/discussion/276/newbie-check-all-checkboxes-fonction/p1 still nothing,

I'm trying to make a checkbox check all of the children checkboxes in the DataTable's table, there's really no excess code to show, however this is what I'm doing now:

[code]





Username
Quote
UserGroup





User1
Quote1
1



User2
Quote2
2



User3
Quote3
3



User4
Quote4
4



[/code]

[code]
$().ready(function() {
$('#usertable').dataTable();
});

$('#check_all').click( function() {
var oTable = $('#usertable').dataTable();
if ($('#check_all').attr('checked'))
{
$('input[name=\'users\']', oTable.fnGetNodes()).attr('checked', this.checked);
}
else
{
$('input[name=\'users\']', oTable.fnGetNodes()).removeAttr('checked');
}
});
[/code]

Can anyone help me here?
This discussion has been closed.