Color list Items according to DB value

I need to color (some) list items based on their status in DB. There is a column in DB table called (MSG_status). When the value is (Unread), I need to color the items in white.

I tried the following on (visible) property :

if(value === 'Unread')
var x = '{$(this).css("background-color", "#ffffff");}';
return x;

In mapping as follows:

But this returns error in console (unexpected token $).
I am not sure if this the right way to add my JS.

I deeply appreciate your help!
1 person has
this question
This topic is no longer open for comments or replies.