I am displaying mySQL in an html table.
I would like to change the TD background color of $qty to red IF $qty >= $max or $qty =< $min
.
I
var min = $('table tr td:eq(0)').text();
var max = $('table tr td:eq(1)').text();
var qty = $('table tr td:eq(2)').text();
if (qty >= max || qty <= min ) {
$('table tr td:eq(2)').css('background-color', 'red');
}
http://jsfiddle.net/7vUFS/3/