I know this question has been asked before but I can’t understand the other treads. I’ll make this as simple as possible. I want to use 10-20 pictures and evey time I open my Wix website, I want a random one of those pictures to be the background picture. thank you very much
Please explain what exactly you didn’t understand in the previous threads.
all the code they were showing us. When I would put it would give me errors. So I think I need to be explained how to do the picture collection properly and then what to put in as code(sorry if am not using the right terms. I’)m new at this
@lennyplante5 It’s really depends on how you use the collection, if you query it directly or use a dataset.
But basically you use Math.ramdom() to get a random number, and then you retrieve this item from your collection.
See an example:
https://www.grampsworkbench.com/Examples/Random-Image
Alright I’m pretty sure I figured out my problem exactly. I understand how the code works and what it<s supposed to do. What I can’t figure out is how to call my main image (image#1) so that the code can detect it like in the link you sent me