troubleshooting Question

jQuery change color of text in sharepoint list

Avatar of Isaac
IsaacFlag for United States of America asked on
CSSMicrosoft SharePointjQuery
13 Comments1 Solution3254 ViewsLast Modified:

I would like to change the text color of a row in a SP list based on a status.  The code below does for a column.  How can I modify it for a whole row?

	$(document).ready(function() {

  $("").filter(function() { return $.inArray( $(this).text(), ["Complete"]) >= 0; }).css("background-color", "#0000FF"); 
  $("'N-0')").css("color", "#FFFFFF");     
  $("").filter(function() { return $.inArray( $(this).text(), ["N-1"]) >= 0; }).css("background-color", "#008000"); 
  $("").filter(function() { return $.inArray( $(this).text(), ["N-2"]) >= 0; }).css("background-color", "#FFFF00"); 
  $("").filter(function() { return $.inArray( $(this).text(), ["N-3"]) >= 0; }).css("background-color", "#FFA500"); 
  $("").filter(function() { return $.inArray( $(this).text(), ["N-4"]) >= 0; }).css("background-color", "#FF0000"); 


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros