-
Hi! I'm using Chocolat because it is so beautiful, simple, easy to use, and provides clean, clear fullscreen images. I'm not an advanced coder, so I'm having trouble with something that probably has a really simple solution, but I can't find any answer in the documentation: I'd like to use a container that starts off with the first image. I can use links (12345 below) to open the lightbox in my container, no problem, but I want the first image to be shown in the container without the user having to click on anything to instanciate it. I tried using the Option 'firstImageIndex' but the container still just starts as a grey box, without any image inside until one of the links is clicked. How do I do it, please? Thanks! :-) ` Doodles
})
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @RightView Can you try like this : // lightbox options
const { api } = Chocolat(document.querySelectorAll('#doodles .chocolat-image'), {
container: document.querySelector('#GalleryBox'),
loop: true,
imageSize: 'scale-down'
})
api.open() |
Beta Was this translation helpful? Give feedback.
Hello @RightView
Can you try like this :