I have a custom slider I'm using in a survey question named `rangeInput`.
Naturally I need to access the value in JS, but I am having trouble
Qualtrics.SurveyEngine.addOnReady(function()
jQuery("#rangeInput").change(function() { // this does not work
// ...
}
});
I can access the slider more generally i.e.,
Qualtrics.SurveyEngine.addOnReady(function()
jQuery("input[type = range]").eq(0).change(function() { // this works
// ...
}
});
but for my purposes I need to access my slider by name. How can I learn how to do this? I've tried other variations I've seen around such as
// ...
currentQID = this.questionId;
jQuery("#" + currentQID + "#rangeInput").eq(0).change(function() {
// ...
}
but this also does not work
Also see:
https://www.qualtrics.com/community/discussion/5963/dynamic-accessing-slider-valueand
https://www.qualtrics.com/community/discussion/5819/using-jquery-to-make-a-field-read-only
Best answer by npetrov937
View original