Jquery fadeIn() not found | XM Community
Skip to main content
Solved

Jquery fadeIn() not found

  • September 24, 2018
  • 3 replies
  • 144 views

JanaJarecki
Hey ladies and gents, I read jquery works in Qualtrics. I tried to use the fadeIn() function but the survey complains that fadeIn() is not a function. I tried adding the jquery min to the header to correct for that in some jquery versions fadeIn() is not included, but this results in some other bunch of errors. Could you help me out? Cheers Jana

Best answer by JanaJarecki

Hi Shashi, hm, interesting, it indeed was the selector, thanks. What I am left with is wondering why the Console complained fadeIn() does not exist. :D Full solution (for future reference for other users): ## Hide and fadeIn() the current question## after a delay of 2500 ms Qualtrics.SurveyEngine.addOnload(function() { jQuery("#" + this.questionId).hide(); }); Qualtrics.SurveyEngine.addOnReady(function() { var qid = "#" + this.questionId; var delayms = 2500; setTimeout(function() { jQuery(qid).fadeIn(1000); }, delayms); });

3 replies

Ritz
Level 2 ●●
Forum|alt.badge.img+1
  • Level 2 ●●
  • 11 replies
  • September 24, 2018
Hey @JanaJarecki , Unless the element is hidden, no fade will occur

  • 0 replies
  • September 24, 2018
Hello @JanaJarecki , jQuery fadeIn() function does work in qualtrics Paste the following code in the js(onReady) of the question jQuery(".QuestionText").hide(); jQuery(".QuestionText").fadeIn(4000); So the above code will fadeIn the question text in four seconds. Hope you are using correct selector(id or class) in jQuery

JanaJarecki
  • Author
  • 9 replies
  • Answer
  • September 24, 2018
Hi Shashi, hm, interesting, it indeed was the selector, thanks. What I am left with is wondering why the Console complained fadeIn() does not exist. :D Full solution (for future reference for other users): ## Hide and fadeIn() the current question## after a delay of 2500 ms Qualtrics.SurveyEngine.addOnload(function() { jQuery("#" + this.questionId).hide(); }); Qualtrics.SurveyEngine.addOnReady(function() { var qid = "#" + this.questionId; var delayms = 2500; setTimeout(function() { jQuery(qid).fadeIn(1000); }, delayms); });