Here is my JQuery Code and I would like to compare the text in the text variable "text" to the possible CR Status (e.g. Approved Implemented), but I don't know how to do it.
_spBodyOnLoadFunctionNames.push("colouring");
function colouring(){
var $th = $("div[Name='CR_x0020_Status']").parent().css("background-color","#66CD00");
var $index = $th.index();
$th.parent().parent().children(".ms-itmhover").each(function(index, elem) {
var $div = $($(this).children("td").get($index));
var text = $div.text();
$("text:contains('Approved')").css("background-color","#66CD00");
})
}
I tried different options, but I still don't know how to do it!
Best regards and thank you in advance
Matthias