Opens a lightbox and optionally passes it the given data.
The openLightbox()
method opens a lightbox and allows you to pass data to it.
Lightboxes that are opened automatically on page load, or via a link from a page element don't receive passed data.
To ensure data can be passed:
onClick
event handler that calls openLightbox()
.If you pass data to a lightbox, call the getContext()
method 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.
The name of the lightbox to open.
The data to pass to the lightbox.