Coding for visual differentiation between the rows of the matrix | Experience Community
Skip to main content
Question

Coding for visual differentiation between the rows of the matrix

  • Apr 23, 2023 9:45 AM UTC
  • 2 replies
  • 88 views

Forum|alt.badge.img+2

Hello everyone,

Do you know if there is a way to visually differentiate the rows (i.e., statements or questions) in the matrix tables?

For example, create alternating dark and light lines, which could help the respondents distinguish between the different items/questions in the matrix.

Thank you so much 
 

2 replies

Shashi
Level 8 ●●●●●●●●
Forum|alt.badge.img+34
  • Level 8 ●●●●●●●●
  • Apr 23, 2023 10:15 AM UTC

Use the below code in the JS of matrix question:

var that = this;
jQuery("#"+this.questionId+" .q-matrix.desktop .ChoiceRow:even").css("background","#d6d6d6")
jQuery("#"+this.questionId+" .ChoiceRow").hover(function() {jQuery(this).css("background", "none");jQuery("#"+that.questionId+" .q-matrix.desktop .ChoiceRow:even").css("background","#d6d6d6");}, function() {jQuery("#"+that.questionId+" .q-matrix.desktop .ChoiceRow:even").css("background","#d6d6d6");});

 


CxEx
Level 5 ●●●●●
Forum|alt.badge.img+13
  • Level 5 ●●●●●
  • Apr 23, 2023 1:34 PM UTC