How to open lightbox programmatically
Closed this issue · 1 comments
marko-mlinarevic commented
As the title says for example I have
new LuminousGallery(
document.querySelectorAll(".jsProjectLightbox"),
{
arrowNavigation: true,
}
);
and I cannot find in documentation what is method to open it manually
sherwinski commented
Hi @marko-mlinarevic, apologies for taking a while to respond to this. Here is what I would suggest:
var anchors = Array.from(document.querySelectorAll(".jsProjectLightbox"));
var lg2 = new LuminousGallery(
anchors,
{
arrowNavigation: true,
}
);
anchors[0].click();
Let me know if this works for you. Thanks!