Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

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

nhertzog
nhertzog IsraelCommunity Member Qubie ✭
edited April 2 in Custom Code

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.

the distance is the "d" in the attached photo, as shown in the preiview screen. the survey is also mobile friendly.

thanks!

Best Answer

  • TomG
    TomG Raleigh, NCCommunity Member, Qualtrics Brand Admin Wizard ✭✭✭✭✭
    Accepted Answer
    jQuery("#"+this.questionId+" .statement").css("padding-bottom","0px");
    

Answers

  • nhertzog
    nhertzog IsraelCommunity Member Qubie ✭

    Thanks @TomG for the reply.

    unfourtanatly it didnt work. the distance remain the same.

    any other ideas?

  • TomG
    TomG Raleigh, NCCommunity Member, Qualtrics Brand Admin Wizard ✭✭✭✭✭
    edited March 29

    Did 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)

  • nhertzog
    nhertzog IsraelCommunity Member Qubie ✭

    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!

  • TomG
    TomG Raleigh, NCCommunity Member, Qualtrics Brand Admin Wizard ✭✭✭✭✭

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

  • nhertzog
    nhertzog IsraelCommunity Member Qubie ✭

    thanks! i was wrong offcourse.

    it worked perfectly.

    thanks @TomG for the quick replies!