Forum Discussion
BerendJanGrimme
3 months agoCommunity Member
Upload a photo and show later
I want to let students upload a few photos in a storyline module. These photos should then appear later in the module. I've done some testing, but I can't figure it out. Is there anyone who can give ...
SamHill
3 months agoSuper Hero
You were almost there. I use the data-acc-text attribute to find the element that I attached the image too. In this example, I set the ALT text to "Your image" and then use a query selector to find the element, and replace the nested SVG (the shape) with the image, e.g document.querySelector('[data-acc-text="Your image"]');
The unusual piece of code is the setTimeout I had to place on the second slide. When you first go to the slide, the image displays, but on subsequent visits, I found the image would not load. It appears to be something to do with the order of execution of script, so I put a small delay on showing the image which appears to work.