I would like to temporarily hide all the radio buttons of a question for 10 seconds. After these 10 seconds, I want to show all (four) radio buttons except the third one, which must remain hidden.
Now hiding all the radio buttons for 10 seconds is not a problem, because that worked. The problem is that all the radio buttons show up after 10 seconds, while I want them all to show up except the third one. Below you can find the JavaScript of this question. I hope you can help me with this.
Add this code to your question JS. It hides the last radio button, but should also work for checkboxes.
Qualtrics.SurveyEngine.addOnload(function(){
ch = this.getQuestionContainer().querySelectorAll("[class*=q-]");
ch[ch.length-1].hide();
});
You can repeat the last line to hide multiple buttons. JS indexing starts from zero, so if you want to hide the first button, it will be
ch[0].hide()similarly, the second last option would be
ch[ch.length-2].hide()and so on.
I'm sorry. I don't understand the problem that you are facing? Also, what is the jQuery code doing in the middle?
This is a different question from what is stated in your title. Please ask a separate question for this or edit your title and initial question. This will make it easier to find the solution.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.