How can i change the position of the choices in a slider question? | XM Community
Solved

How can i change the position of the choices in a slider question?

  • 29 March 2021
  • 6 replies
  • 95 views

Hi, I trying to decrease the distance between slider choice and slider itself.
i modified the location of the slider labels by using jQuery, i couldnt find a way to do the same for the choices location.
image.pngthe distance is the "d" in the attached photo, as shown in the preiview screen. the survey is also mobile friendly.
thanks!

icon

Best answer by TomG 29 March 2021, 13:07

View original

6 replies

Userlevel 7
Badge +27

jQuery("#"+this.questionId+" .statement").css("padding-bottom","0px");

Thanks TomG for the reply.
unfourtanatly it didnt work. the distance remain the same.
any other ideas?

Userlevel 7
Badge +27

https://www.qualtrics.com/community/discussion/comment/36131#Comment_36131Did you put it inside the addOnload function? It not working may have something to do with whatever code you added for the labels since labels are typically above statements (i.e., choices)

first is for the labels, second is what you sent.
this is how it looks in the JS section:

Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery("#"+this.questionId+" ul.labels").insertAfter("#"+this.questionId+" div.statement-container").css("padding", "15px 0px");;
});
Qualtrics.SurveyEngine.addOnUnload(function()
{
jQuery("#"+this.questionId+" .statement").css("padding-bottom","0px");
});

thanks again!

Userlevel 7
Badge +27

addOnUnload is wrong. It needs to be in addOnload or addOnReady.

thanks! i was wrong offcourse.
it worked perfectly.
thanks TomG for the quick replies!

Leave a Reply