Closed Findus23 closed 6 years ago
Turns out that unlike the examples in the docs, the events are called onBeforeClose
and onBeforeOpen
.
Well the documentation is out of date, so this shouldn't be closed.
Also having to deal with these events, and I can't even get onBeforeClose
and onBeforeOpen
working on my project:
const lightGalleryElement = document.getElementById('Gallery');
lightGalleryElement.addEventListener('onBeforeOpen', function() {
console.log('Hello World');
});
In case someone experiences the same issue: https://sachinchoolur.github.io/lightGallery/docs/api.html#events
Hi,
I have tried adding lightgallery to my site and it works really well. But there is one issue left: I can't get events to work.
Reading the docs it seems like the following should work, but while the gallery displays fine, nothing gets logged.
Codepen for reproducing: https://codepen.io/anon/pen/MqwYoN