Response option shading glitch in matrix tables! | XM Community
Question

Response option shading glitch in matrix tables!

  • 9 April 2019
  • 1 reply
  • 4 views

Hello all,

I've been trying to shade the "missing" and "multiple responses" columns in the matrix tables of a data entry form light grey in order to bring them to the attention of anyone entering data. Here is the java script code I have used to do so...

var c= 1 //Enter the column position

var n=3+c;

jQuery("#"+this.questionId+" td.c"+n+" , th.c"+n+"").css("background","lightgrey");

what I cannot figure out is why on some of the matrix tables I've applied this to, the shading seems to apply almost randomly to other aspects of the question (headers of columns I have not specified, in particular). The questions will look perfect in the individual preview tabs, then end up incorrect on the full survey previews and via the anonymous distribution link.

Has anyone else experienced this problem? Can anyone suggest what might be causing this problem?

thank you!

1 reply

Badge +6
@GretchenF, code is applying to all because you have used comma (,). And as comma is a seprator and there is no ID mentoned post comma, it is working as new selector

jQuery("#"+this.questionId+" td.c"+n+" , th.c"+n+"").css("background","lightgrey");

Leave a Reply