Page 1 of 1

Change color in EDIT or ADD with jQuery

Posted: Sun Aug 07, 2016 7:44 pm
by buhuhu

Hi,

I changed colors with jQuery in EDIT. You can try if you need it that:

if ($("#x_id").val() == "0") {

$('td.x_id').css('color', 'red');
$('td.x_id').css('background-color', '#ffe6e6');

}
else
{
$('td.x_id').css('color', 'green');
$('td.x_id').css('background-color', '#BBF6AA');
}

/// where .x_id it is the name of class from template. If you use ID not class us #x_id

Regards,