Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single Image Lightbox and Initialize using api #64

Open
aryanrajseo opened this issue Aug 25, 2021 · 0 comments
Open

Single Image Lightbox and Initialize using api #64

aryanrajseo opened this issue Aug 25, 2021 · 0 comments

Comments

@aryanrajseo
Copy link

Hi, is it possible to create a Lightbox for each image separately and init using the JS? Like i have

<a class="spotlight" href="img1.jpg">
    <img src="thumb1.jpg">
</a>
<a class="spotlight" href="img2.jpg">
    <img src="thumb2.jpg">
</a>
<a class="spotlight" href="img3.jpg">
    <img src="thumb3.jpg">
</a>

it create a group of all 3 images. I want to show only the image clicked. I can use this to customize the lightbox.
data-control="autofit,close"

However, I am not able to see how i can target all the images using the JS code. I tried

<script>
Spotlight.show({
animation: "fade",
control: ["autofit", "close"],
});

</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant