function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Faizan Ali 17Faizan Ali 17 

Colour not changing / no errors in code

Any reason why my code is not displaying the colour?

I want the colour to appear red when it is an appointment and yellow if it is a diary booking:
Table

Here is my code:

Code
Best Answer chosen by Faizan Ali 17
vishal-negandhivishal-negandhi

Hi Faizan, 

You're using styleClass in <td>, which won't work since it's a visualforce attribute.

Just change styleClass to class as below, and it will work
 

<td class="{IF(value == 'Appointment', 'appClass', 'diaryClass')}" >

Hope this helps!