First value color of column does not change on giving color based on data value
First value color of column does not change on giving color based on data value
![sandiiotics](https://secure.gravatar.com/avatar/545e06d45786a7e9fa552fc2b1159590/?default=https%3A%2F%2Fvanillicon.com%2F545e06d45786a7e9fa552fc2b1159590_200.png&rating=g&size=120)
I used the $(row).addClass() method to give color to row based on certain data, it is working but the first column element of this row color does not change. It looks odd. How to solve this issue
This discussion has been closed.
Answers
var table = $('#users_data').DataTable({
responsive: true,
"createdRow": function( row, data, dataIndex ) {
if ( data[4] == 'Online' ) {
$(row).addClass('online_device');
}
});
} );
This is the code used the 'online_device' is the css class used
Duplicated thread, please only post once.
Colin