jquery datatable text color
$(document).ready( function () {
var table = $('#example').DataTable({
columnDefs: [{targets: [0, 1, 2, 3, 4, 5],
render: function ( data, type, row ) {
var color = 'green';
if (data == "example") {
color = 'green';
}
if (data > 10) {
color = 'blue';
}
if (data < 60) {
color = 'red';
}
return '<span style="color:' + color + '">' + data + '</span>';
}
}]
});
} );