I have a lightbox that is triggered by a page menu item. When it opens it displays a 3D carousel gallery. Each image in the gallery is linked to a distinct page anchor and functions correctly when clicked. My issue is I want to make the lightbox disappear when the page scrolls to an anchor after an image in the gallery is clicked. I tried setting onClick event with the gallery but lightbox remains. Here’s the code:
import window from ‘wix-window’ ;
export function gallery31_itemClicked(event) {
//Add your code for this event here:
window.lightbox.close();
}
I suspect that the gallery has a click event in the form of the anchors and they’re conflicting. Anyway, any help is appreciated.
Thanks for the info… looks promising.
Unfortunately I’m so new to this that I’m having trouble comprehending.
If I understand correctly the first part opens the lightbox on load, However, the lightbox will open through user input only. Once open and content is clicked I want to close it automatically. The content being a link to an anchor point on the page.