I'm trying to display the value of a slider choice on Qualtrics.
I have tried all the solutions proposed here: How to get a slider's value in Qualtrics using jQuery?
I am especially interested in being able to do operations with the value chosen. For example, if someone picks a value of 50 (between 0 and 100). I'd like to show this value multiplied by 5 as well (250).
Also, I'd like to show the values of the slider below the slider, rather than in the text box below.
Below is the code that I copied from a different question. The problem is that the value does not adjust when I move the slider.
Qualtrics.SurveyEngine.addOnload(function() {
/*Place your JavaScript here to run when the page loads*/
var result=0;
var otherend= 0;
this.questionclick = function(event,element){
result = this.getChoiceValue(1);
endupdate();
document.getElementById("otherend").innerHTML=otherend;
document.getElementById("result").innerHTML=result;
}
function endupdate() {
otherend=100-result;
}
});
Here is a preview of my survey: https://rady.ca1.qualtrics.com/jfe/preview/SV_d1254aUFRjR2yLH?Q_SurveyVersionID=current&Q_CHL=preview
Could you help me figure out why the value shown does not adapt when I move the slider? Thanks