Hi,
I am trying to add shading to my middle column in a bipolar matrix. I have tried copying and pasting the following code:
var c= 1 //Enter the column position
var n=3+c;
jQuery("#"+this.questionId+" td.c"+n+" , th.c"+n+"").css("background","lightgrey");
BUT, is not sure where to change the column number?! If I copy and paste this into my survey, all my columns are shaded. Would greatly appreciate some advice.
Page 1 / 1
Hi LduP ,
You can use the below code if you want to add color to 5th column,
jQuery("#"+this.questionId).find("tbody tr").each(function(){ jQuery(this).find("td").eq(5).css("background","lightgrey"); })
Likewise, you can simply change the eq() value as per your requirement.
Hi SurajK ,
Thank you so much!! It works perfectly! Really appreciate your assistance. Thanks!
SurajK what would the code be if i wanted to shade a certain row, rather than a column? thanks!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.