Last active
October 23, 2022 15:01
-
-
Save marketinview/11b25d460884f034d5286953698133cf to your computer and use it in GitHub Desktop.
Qualtrics: Reverse Mobile Matrix Choices. Reverse the order of choices in a mobile (accordian) matrix question. Right to Left = Top to Bottom. #qualtrics #js #jq #matrix #mobile #scale #accordian #reverse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qualtrics.SurveyEngine.addOnload(function() { | |
if(jQuery("#"+this.questionId+" .QuestionBody.mobile").length > 0) { | |
jQuery("#"+this.questionId+" tr.ChoiceRow").each(function() { | |
var label = jQuery(this).find("th"); | |
jQuery(this).find("td").each(function(index) { | |
var choice = jQuery(this); | |
if(index > 0) { | |
label.after(choice); | |
if(choice.hasClass("last")) choice.removeClass("last"); | |
} | |
else choice.addClass("last"); | |
}); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See additional Qualtrics solutions at: https://qualtricswiki.tgibbons.com/doku.php