Change color in EDIT or ADD with jQuery

Tips submitted by PHPMaker users

Change color in EDIT or ADD with jQuery

Postby buhuhu » Sun Aug 07, 2016 7:44 pm

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,
buhuhu
 
Posts: 68
Joined: Mon Nov 19, 2012 5:26 pm

Return to User Submitted Tips (PHPMaker)