Code on the page with repeater
export function buttonLightbox_onMouseIn(event) {
wixWindow.openLightbox( ‘LightEx’ );
console.log( “lightbox shows” );
}
code on the lightbox page
import { lightbox1 } from ‘wix-window’ ;
import wixData from ‘wix-data’ ;
import wixWindow from ‘wix-window’ ;
$w.onReady(() => {
let theItem = lightbox1.getContext(); //this is the item you took from page
let postID = theItem._id; // this is the field key for the item ID in the database collection
$w( “#dataset1” ).setFilter(wixData.filter()
.eq( “_id” , postID) //we are now filtering to to
)
.then(() => {
console.log( “Dataset is now filtered” );
})
. catch ((err) => {
console.log(err);
});
lightbox1 is the id on the lightbox page
LightEx is the name of the lightBox
button Lightbox is the name of the hidden button overlaying the image
dataset1 is the name of the connecting dataset on both
On mouse over I get the first image popping up but only on the first preview and never again and it doesnt work with any of the other images.
I dont know what I am doing is correct or if it is indeed possible.
Help desperately wanted
Thanks in advance…with some hope