Change color in EDIT or ADD with jQuery

Tips submitted by PHPMaker users
Post Reply
buhuhu
User
Posts: 203

Change color in EDIT or ADD with jQuery

Post 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,


Post Reply