How do I hide a column in a matrix table using JavaScript? | XM Community
Skip to main content

I've used the code below to hide individual cells in a row in a constant sum matrix table.... and when I hide every cell in a row, the whole row is hidden.
However, I'm now trying to hide a whole column. I can hide every cell apart from the header text for the column... I've tried using different row values (I've used inspect to try and determine the row number of the header).
var that = this.questionId;
var row = 0;
var column = 6;
jQuery("#"+that+" .ChoiceRow:eq("+(row+0)+") .c"+(column-1)+"").css({"pointer-events":"none","visibility":"collapse"}); */repeat for each cell in row*/
Is there an easier way to hide the whole column in a Matrix table (constant sum with total)?

jQuery("#"+this.questionId+" .c4").hide();
Where c4 is the 1st column, c5 the 2nd column, etc.


Leave a Reply