sachinchoolur / lightgallery.js

Full featured JavaScript image & video gallery. No dependencies
https://sachinchoolur.github.io/lightgallery.js/
Other
5.3k stars 596 forks source link

How do I get caption in this situation? #139

Closed Livijn closed 3 years ago

Livijn commented 5 years ago

I am trying to use lightGallery with content generated by CKEditor. Therefor, I cannot change the structure of the HTML (unless I rearrange with JS, no thx). I have looked at the options in the docs but it seems there is no documented way of doing this.

lightGallery(document.getElementById('kennel-page'), {
    selector: 'figure.image img',
    download: false,
});

Here is the markup:

<figure class="image">
    <img data-src="URL" src="URL">
    <figcaption>Some html</figcaption>
</figure>

How do I get the caption in this situation?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. If the issue is still valid for version 2.x, please re-open. Apologize for not responding on time. Thank you for your contributions.