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

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 
 

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");});

 


You can refer below


Leave a Reply