Alternating Row Color with Repeated Headers | XM Community
Skip to main content
Question

Alternating Row Color with Repeated Headers

  • August 19, 2019
  • 1 reply
  • 22 views

Currently, I have repeated headers for lengthy inventories. I would like to have the responses to alternate coloring along with the header for that response. I have this as my code currently, but this only makes the headers a different color as this is the alternating row. jQuery("tr.ReadableAlt").css({"background-color":" lightgray"}); Is there a good way to change or add to this code, to get the desired result.

1 reply

Tom_1842
Level 8 ●●●●●●●●
Forum|alt.badge.img+28
  • Level 8 ●●●●●●●●
  • January 11, 2023

Hi there, try using the below:
jQuery("#"+this.questionId+" .ChoiceRow:odd").css("background","#F8F8F8");