Created
November 29, 2022 22:40
-
-
Save marketinview/50356345b379ecc6f09b3b29b6074444 to your computer and use it in GitHub Desktop.
Qualtrics: Randomize Bipolar Left/Right Statements. Turn off Mobile Friendly (it is useless anyway). #qualtrics #js #jq #bipolar #random
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() { | |
jQuery("#"+this.questionId+" .ChoiceRow").each(function() { | |
if(Math.random() < 0.5) { | |
var row = jQuery(this); | |
row.children().each(function() { row.prepend(jQuery(this)); }); | |
row.find("th").first().removeClass("AnswerLeft").addClass("AnswerRight"); | |
row.find("th").last().removeClass("AnswerRight").addClass("AnswerLeft"); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment