Closed AndBondStyle closed 2 months ago
When using mkdocs-material or instant navigation, plugin injects a script that looks like this:
document$.subscribe(() => { const lightbox = GLightbox(...); });
Instead, I suggest to insert this, making the lightbox variable accessible from outside:
lightbox
const lightbox = GLightbox(...); document$.subscribe(() => { lightbox.reload() });
This makes possible to call various methods of the lightbox instance from other JS scripts.
LGTM! Thanks for your help.
When using mkdocs-material or instant navigation, plugin injects a script that looks like this:
Instead, I suggest to insert this, making the
lightbox
variable accessible from outside:This makes possible to call various methods of the lightbox instance from other JS scripts.