SyntaxFix
Write A Post
Hire A Developer
Questions
If you just want to change the color of the row, you could just access the style.backgroundColor property and set it.
Here is a quick link to a CSS property to JS conversion.