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

Added support for broader use of sub html selectors. #140

Closed Livijn closed 3 years ago

Livijn commented 5 years ago

Solves #139. Could add some info to the docs if you want me to. Here is an example of how it works:

JS:

lightGallery(document.getElementById('kennel-page'), {
    selector: 'figure.image img',
    subHtmlSelector: 'figcaption',
    subHtmlSelectorFromParent: true,
});

Markup:

<figure class="image">
    <img data-src="URL" src="URL">
    <figcaption>Some html</figcaption>
</figure>
cgpro commented 5 years ago

@sachinchoolur is it possible to merge this? Would be a nice feature.

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.