Hello,
Every time I click image in repeater to open in the lightbox It caught an error. But everything work like it should be only still have an error show in my console, even I use the same code on my other site without an error so I don’t know what happened? Can someone help me, please.
My Editor: link
Page name : Members Registry
Thank you for your help
RGDS, Chris
here is my code on repeater page:
import wixData from 'wix-data';
import wixWindow from 'wix-window';
$w.onReady(function () {
$w("#repeaterRegistered").onItemReady(($w, itemData, index) => {
let data = itemData;
$w("#image7").fitMode = "fit";
$w("#image7").onClick( (event) => {
wixWindow.openLightbox('showImg', data);
});
$w("#boxDelete").onClick( (event) => {
wixWindow.openLightbox('DELETE', data)
.then((msg) => {
if (msg === 'ok'){
$w("#regisWarranty").remove();
}
})
});
});
});
here is my code on lightbox (showImg):
import wixWindow from 'wix-window';
$w.onReady(() => {
let itemData = wixWindow.lightbox.getContext();
//let item = lightbox.getContext();
$w("#image5").fitMode = "fixedWidth";
$w("#image5").src = itemData.purchaseInvoice;
})