SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a dashboard on my SharePoint Homepage that shows a RAG status of all our project tollgates, grouped by (a) category then (b) project.

Is there a way to highlight a group by row in a list view to make it stand out?

I tried using this to no avail:

<script type="text/javascript">
        $Text = $("td .ms-vb2:contains('Category:')");
        $Text.parent().css("background-color", "#461B7E");

        var myelement = $Text.parent().parent();
        $Text = $("td .ms-vb2:contains('Project:')");
        $Text.parent().css("background-color", "#4CC417");
        $Text = $("td .ms-vb2:contains('In Progress')");
        $Text.parent().css("background-color", "#EAC117");
share|improve this question

This can be achieved either by using XSLT in a web part such as XSLTLiveViewer (2010) or Content Query Web Part, or by using JavaScript. In the latter case, yes you will probably want to use jQuery. It could also be accomplished using a custom web part.

It would be difficult to troubleshoot your JavaScript without more context, even for somebody who knew jQuery.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.