I try to add a class to a column without having to affect the header
but, I have not been able to achieve it, I have tried several things like.
This is what the API
says"createdRow": function( row, data, dataIndex ) {
if ( data[5] == "1" ) {
$(row).addClass('badge badge-success');
}}
This second one is the one I'm using and it affects the whole column but I just want it to affect the td
:
"columnDefs": [
{
targets: 5,
className: 'badge badge-success',
}
],
This is the result: