I have a matrix with 8 rows. I need to shade rows 3 and 4 and rows 7 and 8 in a different color. Can you please share how do I do this?
Where exactly does the custom code get pasted?
I have a matrix with 8 rows. I need to shade rows 3 and 4 and rows 7 and 8 in a different color. Can you please share how do I do this?
Where exactly does the custom code get pasted?
Hey
mabey this code can workQualtrics.SurveyEngine.addOnload(function() {
// Target rows 3 and 4
jQuery("#QID1 #3, #QID1 #4").css("background-color", "lightblue");
// Target rows 7 and 8
jQuery("#QID1 #7, #QID1 #8").css("background-color", "lightgreen");
});
Replace "QID1"
with the actual ID of your matrix question. Also, ensure that you replace "3"
, "4"
, "7"
, and "8"
with the IDs of the rows in your matrix question.
select te question and then javascript of the question.
The first line off the code you will also find it there. Overwrite that line with this code
Here is an easier way. You don’t have to lookup or replace anything:
Qualtrics.SurveyEngine.addOnload(function() {
jQuery("#"+this.questionId+" .ChoiceRow").each(function(i) {
if(i%4 >1) jQuery(this).css("background-color","#eee");
});
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.