Add a lightbox to your site
Add elements you wish to display
Connect the elements to your dataset
import wixWindow from 'wix-window';
$w.onReady(function () {
$w("#repeater9").onItemReady(($w, data) => {
$w("#triggerButton").onClick(() => {
wixWindow.openLightbox("Christmas Lightbox", data._id)
})
})
});
Lightbox Code
import wixWindow from 'wix-window';
import wixData from 'wix-data';
$w.onReady(function () {
let dataID = wixWindow.lightbox.getContext();
console.log(dataID)
$w("#dataset1").setFilter(wixData.filter().eq("_id", dataID));
});
Have fun!
Comments