Delay choice container with JS | XM Community
Skip to main content

Delay choice container with JS

  • January 13, 2023
  • 6 replies
  • 86 views

Forum|alt.badge.img+1

I would like to hide the (multiple) choice container and then show it later. I tried this code, but it doesn't work. Does anyone have any suggestions? Thanks!
Qualtrics.SurveyEngine.addOnReady(function()
{
jQuery("#getChoiceContainer").hide(); 
 setTimeout(function() { jQuery("#getChoiceContainer").show(); },15000);
});

6 replies

Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • 2050 replies
  • January 13, 2023

Qualtrics.SurveyEngine.addOnReady(function () {
    const that = this;
    jQuery(that.questionContainer).hide();

    setTimeout(function () {
        jQuery(that.questionContainer).show();
    }, 15000);
});


Forum|alt.badge.img+1
  • Author
  • 3 replies
  • January 13, 2023

Thank you, ahmedA. I would like to delay the choice container, not the question container. I tried choiceContainer instead of questionContainer, but it did not work either. Any suggestions?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • January 13, 2023

https://community.qualtrics.com/XMcommunity/discussion/comment/54025#Comment_54025Use this:
Qualtrics.SurveyEngine.addOnload(function() {
var qb = jQuery("#"+this.questionId+" .QuestionBody");
qb.hide();
    setTimeout(function() { qb.show(); },15000);
});


Forum|alt.badge.img+1
  • Author
  • 3 replies
  • January 13, 2023

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • January 13, 2023

Forum|alt.badge.img+1
  • Author
  • 3 replies
  • January 13, 2023