Opens a lightbox and optionally passes it the specified data.
The openLightbox() method opens a lightbox and allows you to pass data to it.
Lightboxes that are opened automatically on page load, or with a link from a page element don't receive passed data.
To ensure data can be passed:
onClick event that calls openLightbox().If you pass data to a lightbox, call getContext()
in the lightbox's code to access the received data.
Notes:
openLightbox(). You can find the lightbox's name by selecting the lightbox and clicking the settings button.openLightBox() after the onReady() method, once all page elements have finished loading.Name of the lightbox to open.
Data to pass to the lightbox.
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.