I am using a slider with values from 0 to 100. I would like to place the labels "Mild" "Moderate" and "Severe" along the horizontal axis but I do not want them to be automatically put at 0, 50 and 100. I would actually like the "mild" to be at 10, "Moderate" at 35 and "Severe" at 75. Is there a way to do that with js? I can simply not code, so I am very appreciative for any help!
Page 1 / 1
Hello @DrPRW ,
Assuming you have only three labels to the slider question.
Paste the below code in the js(OnReady) of slider question
var that=this.questionId;
var s=["center","left","left"];
for(var i=0;i<=2;i++){
jQuery("#"+that+" ul.labels li:eq("+i+")").css("text-align",s[i]);
if(i==1){
jQuery("#"+that+" ul.labels li:eq("+i+")").css("padding-left","75px");
}
}
Assuming you have only three labels to the slider question.
Paste the below code in the js(OnReady) of slider question
var that=this.questionId;
var s=["center","left","left"];
for(var i=0;i<=2;i++){
jQuery("#"+that+" ul.labels li:eq("+i+")").css("text-align",s[i]);
if(i==1){
jQuery("#"+that+" ul.labels li:eq("+i+")").css("padding-left","75px");
}
}
Thank you for such a quick reply. Where can I go about learning to do this for myself? Is this javascript or css or a combination? Thanks again (and it worked perfectly!).
> @DrPRW said:
> Thank you for such a quick reply. Where can I go about learning to do this for myself? Is this javascript or css or a combination? Thanks again (and it worked perfectly!).
It's good to hear that you are interested in learning this, much appreciated. So, you can find the resource to learn here.
> Thank you for such a quick reply. Where can I go about learning to do this for myself? Is this javascript or css or a combination? Thanks again (and it worked perfectly!).
It's good to hear that you are interested in learning this, much appreciated. So, you can find the resource to learn here.
When I add a question under this one the descriptors are under the second question for some reason. I am actually asking the listeners to rate on two different scales for each audio file. One block will be one file with 2 questions. I have a screen shot of what is happening. I would like the "mild" "moderate" "severe" to be under the 1st question, not the second. Thank you!!
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.