Closed xdcha closed 1 year ago
Would appear it does not automatically initialise for me.
import Lightbox from 'bs5-lightbox';
document.querySelectorAll('[data-lightbox]').forEach(el => el.addEventListener('click', Lightbox.initialize));
This indeed solves it.
Firstly, thanks for creating such a great plugin. Seems to work brilliantly when I run it locally. In production, however, it breaks. No console errors and when you click an image you are just taken to the source in a new window. I am using Bootstrap 5.
Am I doing something wrong?
App.js (entry file)
File.html
When I view the source js file in production there is no reference to
data-toggle
but there is in development mode.Appreciate any advice/guidance.