Hi ,
I have Custom List called Student, it has a field called "Status',this filed has a drop down list Contains Red,Green and Yellow.
If i select Red then background should become Red
If i select Green then background should become Green
If i select Yellow then background should become Yellow
How can i do that.Please help me?
Loading

Brijendra GautamPosted Mar 17, 2014, 1:35 AM
Just pass the index of your column in eq.
$(document).ready(function(){
$(".ms-listviewtable tr").each(function(){
$(this).find("td:eq(4)").each(function(){
var color =this.innerHTML;
$(this).css("background-color",color);
});
});
});
Sagar PardeshiPosted Jan 13, 2014, 5:20 AM
Add Content editor in your form