How can I add colour to alternative rows with repeated headers? | XM Community
Skip to main content
Question

How can I add colour to alternative rows with repeated headers?

  • June 10, 2020
  • 3 replies
  • 34 views

Screenshot (31).pngWhen I try to add colour to alternative rows with repeated headers, it adds colors to the headers. I want to add colour to alternative questions Could anyone help me with the Javascript code for this? Thank you in advance.

3 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • June 10, 2020

Use the below code:
jQuery("#"+this.questionId+" .ChoiceRow:odd").css("background","#d7d7d7");


  • Author
  • June 11, 2020

Thanks a lot for your help :D


Hi rondev, is there a way to modify this code to specify which row I want to change the color for? For example, if I want to do that specifically for row #5?