Using Javascript to shade some boxes in a matrix table | XM Community
Skip to main content

I have a matrix table with 5 columns, A,B,C,D,E. I would like to shade boxes in some rows for each question, the boxes shaded are not consistent across the survey. For instance, this would be the pattern of shading:

A,C,D

B,C,E

etc etc

Is this possible? Would someone be able to help me out with a hint on the code please?

 

Use the below code to shade column 1. Similarly, change the value of ‘n’ to shade the required columns

var n = 1;
jQuery("#"+this.questionId+" .c"+(n+3)).css("background","#d6d6d6")


 


Leave a Reply