How can I add a header to the right statement/answer for a max diff | XM Community
Solved

How can I add a header to the right statement/answer for a max diff


How can I add a header to the right statement/answer for a max diff? Currently, I can only do it for the left answer using this:
jQuery("#"+this.questionId+" td.c1:first").html("Statement A");
jQuery("#"+this.questionId+" td.AnswerLeft").html("Statement B");

I can't figure out how to do the same for the right side and the text has to be in line with the column headers

ex1.PNG

icon

Best answer by TomG 27 May 2020, 23:43

View original

7 replies

Userlevel 5
Badge +4

Use the below code,
jQuery('tbody tr:eq(0)').find('td:last-child').after('Statement B')

Thanks!! However, the new label isn't aligned with statement B. Instead, it looks like it's part of a new empty column.

For now I have just included the labels as part of the question text but this is also not an ideal layout

image.png

Userlevel 7
Badge +27

For a bipolar matrix:
jQuery("#"+this.questionId+" tr.ColumnLabelHeader").append("Statement B");

TomG Thanks for your help!
It looks like it did work but it'd also adding text to the radio buttons. Is there a way to hide these?
image.png

Userlevel 7
Badge +27

It looks like it did work but it'd also adding text to the radio buttons.

That text must be from something else you've done.

Userlevel 5
Badge +4

Try to add one more td before the actual statement, like this,
jQuery('tbody tr:eq(0)').find('td:last-child').after('Statement B')

SurajK this last one worked!! thanks 😊
image.png

Leave a Reply