Load gif from beginning and after everything else? | XM Community
Skip to main content
Solved

Load gif from beginning and after everything else?


Hi, I want to make sure that gifs in my question load from the beginning of the gif file and after everything else on the page. In other words, I want to ensure that the user sees the gif in its entirety. What would be a good solution for this? Thank you, S

Best answer by Anonymous

Hello @syntheso Paste the following code in the js(onLoad) of the question jQuery(".HotSpotImage").attr("src",""); AND Paste the following code in the js(onReady) of the question ` jQuery(".HotSpotImage").attr("src","YOUR_GIF_URL");`
View original

10 replies

Jesi
Level 2 ●●
Forum|alt.badge.img+1
  • Level 2 ●●
  • 13 replies
  • October 15, 2018
Hi @Syntheso, add first gif question and ask respondent what they can see. if they select correct answer for your gif than it is assure that they can see gif.

  • Author
  • 7 replies
  • October 15, 2018
Hi Jesi, Thank you for your response but that doesn't solve my problem. The gif is a test item so I want to ensure that they see it from the beginning. At the moment sometimes the gif loads in the middle of the animation or sometimes at the last frame and it also loads after everything else. I want to combat this somehow to ensure that everything else loads, then the gif starts_ from the beginning_.

  • Author
  • 7 replies
  • October 15, 2018
This seems like a good solution but I don't know how to implement it in Qualtrics: https://stackoverflow.com/questions/24145424/how-to-make-gif-always-to-start-from-beginning-in-jquery-mobile

  • 0 replies
  • October 15, 2018
> @syntheso said: > This seems like a good solution but I don't know how to implement it in Qualtrics: > > https://stackoverflow.com/questions/24145424/how-to-make-gif-always-to-start-from-beginning-in-jquery-mobile Add the code in the above link in the Rich content editor --> HTML view of the question

  • Author
  • 7 replies
  • October 15, 2018
Why not in the Javascript input form?

  • 0 replies
  • October 15, 2018
> @syntheso said: > Why not in the Javascript input form? Yes, you can put that in the js of the question but in onLoad and replace #correctGIF with .QuestionText

  • Author
  • 7 replies
  • October 15, 2018
Could you please provide me with the full code? I don't have the understanding of how to put it all together.

  • 0 replies
  • October 16, 2018
> @syntheso said: > Could you please provide me with the full code? I don't have the understanding of how to put it all together. Paste the following code in the js(onReady) of the question jQuery('.QuestionText img').attr("src",""); // remove it jQuery('.QuestionText ').append('<img src="YOUR_GIF_URL">');

  • Author
  • 7 replies
  • October 16, 2018
Thank you. However, this results in two images in my post. I require the image to be used as part of the question so I can draw hotspots on top of it. Very best, Seb

  • 0 replies
  • Answer
  • October 16, 2018
Hello @syntheso Paste the following code in the js(onLoad) of the question jQuery(".HotSpotImage").attr("src",""); AND Paste the following code in the js(onReady) of the question ` jQuery(".HotSpotImage").attr("src","YOUR_GIF_URL");`

Leave a Reply