I have the following javascript code inside index.php:
$(function () {
$('.checkall').click(function () {
$(this).find(':checkbox').attr('checked', this.checked);
});
});
I retrieve information via ajax and create a table from that information using jQuery Data Tables, inside data tables head I have a checkbox with class='checkall'.
Why doesn't the checkbox that is inside the head check all other checkboxes retrieved via ajax?
*I get not errors inside Firebug
*I checked How to check every checkboxes in a jquery datatable? but still don't get it ... :(