I am working on a mobile friendly accordion style matrix question and the UI for the first 3 statement options auto collapses the accordion to show the next statement. How do I achieve the same effect for the 4th and final statement before the user would continue to the next question?
Page 1 / 1
Hi Jared, Try adding this JavaScript code in that question.
Qualtrics.SurveyEngine.addOnReady(function () {
var $this = jQuery(this.questionContainer);
var isMobile = jQuery(".QuestionBody", $this).is(".mobile");
jQuery(".ChoiceRow input id]uname]", $this).on("change", function () {
if (isMobile && jQuery(this).closest(".ChoiceRow").nextAll(".ChoiceRow").length === 0) {
jQuery(this).closest(".ChoiceRow").find("thcid]").click();
}
});
});
Thank you! This worked like a charm!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.