-
The document describes for es6 import way as follows:
But I am interested to load in browser directly as follows:
|
Beta Was this translation helpful? Give feedback.
Answered by
trvswgnr
Apr 9, 2022
Replies: 1 comment
-
If you're using the bundled version in 1.7.11 then the Lightbox class gets added to Also heads up, you can use the Lightbox's initialize method for brevity like so: document.querySelectorAll('.mytoggle').forEach((el) => el.addEventListener('click', Lightbox.initialize)); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
trvswgnr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're using the bundled version in 1.7.11 then the Lightbox class gets added to
window.bootstrap
so just replaceLightbox
withbootstrap.Lightbox
. However, this has been changed in v1.8.0 and the Lightbox class is available directly when using the bundled/CDN version.Also heads up, you can use the Lightbox's initialize method for brevity like so: