Is there anything I can do (js code? question settings?) to change the grid line values to match what I need them to be at (10, 20, 30, .... ,90, 100)?Solved
Change Slider Question Values
Hi,
Currently working on a survey in which I'm using the slider question and I want the slider to start at 1 and go to 100 with the grid line values being at 10, 20, 30,...,90, 100. At present, I have the settings as follows:
Min value: 1
Max value: 100
Grid lines: 10
and the question looks like this
!
Is there anything I can do (js code? question settings?) to change the grid line values to match what I need them to be at (10, 20, 30, .... ,90, 100)?
Is there anything I can do (js code? question settings?) to change the grid line values to match what I need them to be at (10, 20, 30, .... ,90, 100)?Best answer by fleb
Hi @KS28 ,
you can access any element using CSS selectors and modify its HTML content.
Try the following code:
Qualtrics.SurveyEngine.addOnload(function()
{
var myCSS = "#" + this.questionId + " .q-slider .horizontalbar .numbers li";
var n = jQuery(myCSS).length;
var JQ, i, val;
for (i = 1; i < n; i++)
{
JQ = jQuery(myCSS + ":nth-of-type("+i+")");
val = Number(JQ.html());
JQ.html(val + 1);
}
});
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
