I have a series of lightboxes which I have linked i.e. user clicks a button on lightbox1 which opens lightbox2. I want the lightbox2 to open without a delay between it opening and lightbox1 closing. Is there any way to achieve this or any workaround which would achieved the same outcome?
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
You can simply add code to your button so that the lightbox2 is opened and then lightbox 1 is closed, instead of simply having the lightbox 1 close and then the lightbox 2 open.
https://www.wix.com/corvid/reference/wix-window.lightbox.html#close
https://www.wix.com/corvid/reference/wix-window.html#openLightbox
Although the difference in time between one lightbox closing and another one opening is minimal for myself, so I would just stick with the common practice of closing the one and opening the other one automatically through the buttons onClick event handler function.
So instead of something like this....
export function Button_click(event) { wixWindow.lightbox.close(); wixWindow.openLightbox("Lightbox2"); }
to something like this
export function Button_click(event) { wixWindow.openLightbox("Lightbox2"); wixWindow.lightbox.close("Lightbox1"); }