How to change td color
- Single Page
Posted 01 February 2013 - 22:53 PM
How can I change cell (td) color based on value from database?
If there is 0 in table cell then td color should be red and if cell value is 1 then td background color should be green.
Can anyone tell me how it can be done?
Best regards.
Tom.
Posted 02 February 2013 - 00:14 AM
you can change the view file (list.php).
Posted 02 February 2013 - 11:22 AM
But that doesn't explain what to do.
Could you kindly show me how to do it?
Posted 02 February 2013 - 11:27 AM
Posted 17 March 2015 - 02:41 AM
Fist Call "callback column"
And retunr something like
return '<span class="bad-wait" style="color:#CD0A0A;"><i class="fa fa-exclamation-triangle"></i> ' . $dias_faltantes_sobrepasados . ' dÃas ' . $tipo_dias . '</span>';
in the Output File
$('.bad-wait').parent().parent().addClass( "danger" );
It's All
Look mi Web