Hi, I placed on my homepage a strip with an image in it as background (I use Wix in French so Iโm not sure if strip is the good word).
I would love to be able to put more than one picture in this strip and everytime a visitor go on the page, the strip background choose to show a random picture that I selected.
Also, the random option with the common galleries would be nice too.
Create a Database with pictures and connect the strip with that dataset.
function getRandomInt(max) { return Math.floor(Math.random() * Math.floor(max));
}
export function dataset1_ready() { let maxCall = $w(โ#dataset1โ).getTotalCount(); let randNum = getRandomInt(maxCall);
console.log(randNum);
$w(โ#dataset1โ).setCurrentItemIndex(randNum);
}
Well, this code may probably be very helpful, and I am thankful for it. Unfortunately, I already tried many times to use Wix Code, create collections and all these things but it seems that I am genetically not made to understand that, whatever my efforts, thatโs why I ask to the devs to make it.