Hi there!
I used a code I found in the forum that opens an item image to a lightbox.
it works perfect! Im wondering if i can do it on a repeater.
When i put in the code it opens the images in a lightbox but all the same image.
these are the codes i used
this one is on the page with the repeater:
export function statusesImage_click(event) {
wixWindow.openLightbox('statuses image lightbox', $w('#dataset1').getCurrentItem());
}
this one is in the lightbox:
I believe it has somthing to do with the onReady()) - I tried onItemReady()) but it did not work for me either
import { lightbox } from 'wix-window';
$w.onReady(() => {
let item = lightbox.getContext();
$w("#statusImage").src = item.statusImage;
$w("#title").text = item.title;
});
thanks in advance,
michal
$w.onReady(() => { $w("#repeater1").onItemReady(($i, iData) => { $i("#statusesImage").onClick(event => { wixWindow.openLightbox('statuses image lightbox', iData.statusImage); }) }) })
Thanks! Didn´t know multistage boxes! Will definetly use that
Hey! Is there a way to do this but opening the image in a placeholder in the same page instead of in a lightbox? Thanks!