I would like to introduce a new row in the DT when some condition is met. It is for presentation purposes.
For example, if the first column has the value "General risk" in some row, then a new row with only one column is introduced before. The new column will have the value "RISKS". I have the following rowCallback:
rowCallback = I(
'function(row, data) {
if (data[1] == "General risk")
$("tr", row).prepend("<tr><td>RISKS</td></tr>");
}'
)
The line $("tr", row).prepend("<tr><td>RISKS</td></tr>");
doesn't work and I don't know how to fix it.
Thanks in advance.