this.checked not working

this.checked not working

benpeterbenpeter Posts: 14Questions: 5Answers: 0
edited December 2014 in Free community support

Hallo. I am trying to select and deselect checkboxes in a tables tbody from a checkbox in the header. This is my code:

("#checkall").click(function () {
$("input", myTable.fnGetNodes()).each(function () {
$("input", myTable.fnGetNodes()).prop("checked", this.checked);
});

However, this is not working and i suspect this.checked argument in the prop method because i cannot get the .checked from the intelisense. Am using jQuery 2.1.1 and datatables 1.10.

Thank you

This discussion has been closed.