I added the following JS to my slider questions, which moved the slider labels to be placed below the slider. However, it totally messed up my response summary (the summary that respondents get of their own responses before submitting the survey).
{jQuery("ul.labels").insertAfter("div.slider-container:last");}
Basically the problem is that now that in the respondent's response summary, the slider questions are all clumped together, and the labels are all clumped together at the bottom (aka the labels are detached from the sliders!).
Does anyone have any guidance here?
Page 1 / 1
Hi @qualtricsnoob ,
Try using the below code:
`jQuery("#"+this.questionId+" ul.labels").insertAfter("#"+this.questionId+" div.slider-container:last");`
Try using the below code:
`jQuery("#"+this.questionId+" ul.labels").insertAfter("#"+this.questionId+" div.slider-container:last");`
Hi @Shashi ,
Thanks for the response. That didn't seem to work. In the respondents' response summary, the labels are still detached from the sliders.
Could it be where I am placing the code? I have edited the question JS as follows:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
jQuery("#"+this.questionId+" ul.labels").insertAfter("div.slider-container:last");
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
Thanks!
Thanks for the response. That didn't seem to work. In the respondents' response summary, the labels are still detached from the sliders.
Could it be where I am placing the code? I have edited the question JS as follows:
Qualtrics.SurveyEngine.addOnload(function()
{
/*Place your JavaScript here to run when the page loads*/
});
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
jQuery("#"+this.questionId+" ul.labels").insertAfter("div.slider-container:last");
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
/*Place your JavaScript here to run when the page is unloaded*/
});
Thanks!
> @qualtricsnoob said:
> Hi @Shashi ,
>
> Thanks for the response. That didn't seem to work. In the respondents' response summary, the labels are still detached from the sliders.
>
> Thanks!
Please try using the updated code
jQuery("#"+this.questionId+" ul.labels").insertAfter("#"+this.questionId+" div.slider-container:last");
> Hi @Shashi ,
>
> Thanks for the response. That didn't seem to work. In the respondents' response summary, the labels are still detached from the sliders.
>
> Thanks!
Please try using the updated code
jQuery("#"+this.questionId+" ul.labels").insertAfter("#"+this.questionId+" div.slider-container:last");
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.