fires when the user clicks a custom button in the lightbox
id | string | the button's id |
node | HTMLElement | an HTML element of the clicked button |
e | event | a native 'click' event object |
scheduler.attachEvent("onLightboxButton", function (id, node, e){
// any custom logic here
});
The event fires only for custom buttons at the bottom of the lightbox and doesn't fire for the default or section buttons.
To check whether the lightbox is currently opened or closed, use the lightbox_id property of the state object returned by the getState method. If the lightbox is opened, the method will return the id of the opened event, otherwise 'null' or 'undefined' will be returned:
if (scheduler.getState().lightbox_id){
//the code for the opened lightbox
} else {
//the code for the closed lightbox
}