Hi
Being new, apologies if the question is trivial or has already been addressed here.
I have a repeater (static) and clicking on one of its items opens a lightbox. In the lightbox, I have placed a slideshow and each slide corresponds to an item of the repeater. Unfortunately, whichever repeater item I click on, it displays the first slide of the slide show.
I am looking for a solution to start the slideshow on the slide that corresponds to the repeater item that is clicked on.
Thanks for your help !
The page code is
import wixWindow from 'wix-window'; $w.onReady(function () { // Write your JavaScript here // To select an element by ID use: $w("#elementID") $w("#TeamRepeater").onItemReady(($i, iData, index) => { $i("#TeamPic").onClick(event => { wixWindow.openLightbox('LightBoxTeamProfiles', index); }) }) });
The lightbox code is
import wixWindow from 'wix-window'; $w.onReady(function () { let received = wixWindow.lightbox.getContext(); $w('#slideshowTeamProfiles').changeSlide(received.index); } );
Thank you for your advice
Where is your used code?