Reputation: 924
I have some JavaScript I've used in the past on multiple choice:multiple response questions to hide certain check boxes in order to create headers in the response options. The following would hide the check boxes from the first and fifth items:
$("QR~QID40~1").style.display="none";
$("QR~QID40~5").style.display="none";
This used to work with the "Business Modern Blue" theme, but Qualtrics recently discontinued it (along with many others). The remaining skin that best fit my needs is "Minimal 2014." I checked the element ids and they're still the same. I've also tried $("QR~QID40~1").style.visibility="hidden";
with no success. At the very least, these don't work in Firefox or Chrome. Qualtrics has removed almost all of the online JavaScript help that used to be available with no explanation (that I could find), so I'm stumped.
Upvotes: 0
Views: 110
Reputation: 5029
You need to hide the label instead of the actual checkbox. Try the following. It has the added benefit of not hard coding the QID:
var qid = this.questionId;
var q = $(qid);
q.down('label[for="QR~'+qid+'~1"]').hide();
q.down('label[for="QR~'+qid+'~5"]').hide();
That said, a better way to create headers in response options is to use Choice Groups (choose from the cog to the left of the question). That way, you won't need JavaScript at all.
Upvotes: 2