I used the above code to apply a background color on a line with the word High in a field (choice). It does not work. I have used a code that matches exactly the word as in other fields (descriptions etc) there might be written the word High in other contexts.
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("td .ms-vb2").filter( function (index) {
return $(this).text() == "High";
})
$Text.parent().css("background-color", "#F5A9A9");
});
</script>
What am I doing wrong?