So I’m adding a row to my datatable using
var newRow = myTable.row.add([
questionText,
'',
'',
'',
'',
''
]).draw(false);
And I then want to get all the cells from that row and assign ids and onclick elements and classes and whatnot.
I tried
newRow.cells().every( function () {
var cell = $(this.node());
});
but this iterates over all the cells in the entire table, for some reason. I’ve been looking online and through the documentation, but nothing I find seems to work. I found a plethora of example using data to change the cells values, but I don’t want to change their values I want to edit the elements themselves…
any help?