You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, first of all, thank you for all this work. Chocolat is fantastic.
I have one doubt.
I am using the chocolat.js for an image gallery. I use it inside a div with the option: container: document.querySelector
I would like the description of the image to be extracted from the accompanying text instead of the 'title' attribute.
Ex:
<div class = "image">
<a class="chocolat-image" href="https://images.pexels.com/photos/4558481/pexels-photo-4558481.jpeg" title="Lore ipsum.">
<img src = "https://images.pexels.com/photos/4558481/pexels-photo-4558481.jpeg" />
</a>
<span class = "caption">
In non ultricies magna, nec vulputate pain. Aenean sollicitudin ex id lectus fermentum, a tempus lacus cursus.
<span>
</div>
Many thanks.
The text was updated successfully, but these errors were encountered:
constimages=[{src: 'https://images.pexels.com/photos/4558481/pexels-photo-4558481.jpeg',title: 'In non ultricies magna, nec vulputate pain. Aenean sollicitudin ex id lectus fermentum, a tempus lacus cursus.'},// ...]const{ api }=Chocolat(images,{// options here})document.querySelector('#chocolat-image').addEventListener('click',()=>{api.open()})
In the mobile version I disable chocolat and I want a 'span' or 'paragraph' to be seen as the caption. That is the reason. For SEO reasons I need it to be like this. So I need the text to be extracted instead of the 'title' attribute of the 'span' text. Is this possible?
Hello, first of all, thank you for all this work. Chocolat is fantastic.
I have one doubt.
I am using the chocolat.js for an image gallery. I use it inside a div with the option: container: document.querySelector
I would like the description of the image to be extracted from the accompanying text instead of the 'title' attribute.
Ex:
Many thanks.
The text was updated successfully, but these errors were encountered: