Add repeat headers/labels to Slider question | XM Community
Skip to main content

Hi,

I am trying to add repeat headers (known as labels in “format”) to my Slider question.

Has anyone got a JavaScript I can paste in?

Thanks,

D

Use below code:

	jQuery("#"+this.questionId+" ul.labels").clone().insertBefore("#"+this.questionId+" .slider-container:not(:eq(0))")

 


Use below code:

	jQuery("#"+this.questionId+" ul.labels").clone().insertBefore("#"+this.questionId+" .slider-container:not(:eq(0))")

 

Hi, thanks for the suggestion. It doesn’t seem to work when I preview it after I inputted this to the “Edit Question JavaScript”, which resulted in the entire script saying:

 

 

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*/

});

Qualtrics.SurveyEngine.addOnUnload(function()
{
    /*Place your JavaScript here to run when the page is unloaded*/

});


jQuery("#"+this.questionId+" ul.labels").clone().insertBefore("#"+this.questionId+" .slider-container:not(:eq(0))")

 

 

 

Any other suggestions?


The code should be paste as below:

 


The code should be paste as below:

 

That works! Marvelous, thanks @Shashi 


Leave a Reply