JSFiddle - React, Tailwind, and code Playground
by Yogesh Salgar
HTML
<div class="table-responsive">
<table class="table table-bordered table-hover table-condensed">
<tbody>
<tr class="success">
<td>True</td>
</tr>
<tr class="danger">
<td>False</td>
</tr>
</tbody>
</table>
</div>
JavaScript
$(document).ready(function(){
var listItems = $(".table tr td");
listItems.each(function(idx, li) {
if($(this).text() == 'True'){
$(this).css('background','green');
}else if($(this).text() == 'False'){
$(this).css('background','red');
}
});
});