Delayed Slider Question Doesn't work with my Javascript

TrindaTrinda CanadaCommunity Member Qubie ✭

Delayed Slider Question Doesn't work with my Javascript

Hello! I'm new to customizing Qualtrics survey questions and need some support. I have slider questions that I'm using Javascript to delay until after a video finishes playing (I found the script in this post), but the slider doesn't work once it appears after the delay. The slider disappears and I'm not able to move the slider when previewing it (see image below). My other questions (e.g., multiple choice) work just fine though with the exact same script. Does anyone know how I can fix this?

Best Answer

  • ahmedAahmedA IndiaCommunity Member Superuser ✭✭✭✭
    Accepted Answer

    This seems to be a really weird issue. Perhaps Qualtrics should look into it. @LaurenK could you please ask someone from the tech team to check why the slider gets disabled when it is hidden.

    Meanwhile, you can use this code to get the job done.

    Qualtrics.SurveyEngine.addOnReady(function () {
        qid = "#" + this.questionId;
        document.querySelector(qid).style.opacity = "1%";
        delay_time = 3000;
        setTimeout(function () {
            document.querySelector(qid).style.opacity = "";
        }, delay_time);


  • LaurenKLaurenK Seattle, WA, USACommunity Administrator Administrator

    Hi @ahmedA! Unfortunately, the Qualtrics Support team is unable to provide assistance with troubleshooting custom code solutions. Posting right here in the Developer Corner will be your best bet moving forward! 😀

  • ahmedAahmedA IndiaCommunity Member Superuser ✭✭✭✭

    Thanks for update Lauren, but I think this problem isn't associated with the custom code, but instead with how Qualtrics implements the slider.

    There is some code at the backend, which freezes the slider once it is hidden. Perhaps someone from the tech team could share advice on how to avoid this issue or what is causing the freeze. Because it doesn't happen with other questions.

  • TrindaTrinda CanadaCommunity Member Qubie ✭

    Thank you @ahmedA! I decided to go a different route with the survey but I appreciate your response

Sign In to Comment