Opens a popup and optionally passes it the specified data.
Note: The terms popup and lightbox refer to the same element. While the editor and dashboard now refer to it as a popup, the API methods continue to use the term lightbox for backward compatibility. The documentation uses both terms accordingly.
The openLightbox() method opens a popup and allows you to pass data to it.
Popups 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 popup, call getContext()
in the popup's code to access the received data.
Notes:
openLightbox(). You can find the popup's name by selecting the popup and clicking the settings button.openLightBox() after the onReady() method, once all page elements have finished loading.Name of the popup to open.
Data to pass to the popup.