Stimulus not working | XM Community
Question

Stimulus not working

  • 16 March 2019
  • 1 reply
  • 3 views

Badge
Hi! I'm working on a project that involves a repeated lottery task - the task involves betting on an outcome and then spinning a wheel. The wheel is a gif that has been uploaded to the ibb.co host website and the questions containing the lottery task make use of JavaScript code to call the gif from the internet. The issue is that after the first two times (i.e. first two questions) of playing the lottery task, the gifs stop working and just show as static images. How can I modify my code such that the gifs play from the very beginning every single time?

1 reply

Userlevel 5
Badge +6
Hi @KS28,
why do you need JavaScript to display a gif image? And why you haven't provided the code here? No one can tell what's wrong with the code without seeing it.
However, if you want just to display the same animated image on multiple pages, you can use just a simple HTML `img` tag: `<img src="url_of_your_gif">`. I have pasted this into the 5 questions in separate blocks and it worked everywhere.

Leave a Reply