Closed craigerskine closed 3 years ago
Yeah this was annoying me too. This is how I worked around it. They still need a unique ID unfortunately.
$(document).ready(function(){
var galleries = ["gallery1","gallery2","gallery3","gallery4","gallery5","gallery6"];
var galleriesLength = galleries.length;
for (var i = 0; i < galleriesLength; i++) {
lightGallery(document.getElementById(galleries[i]), {
download: false,
subHtmlSelectorRelative: true,
thumbnail: true
});
}
});
lol. this problem is still relevant
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.
None of the examples on this page work: https://sachinchoolur.github.io/lightgallery.js/demos/html-markup.html
I'm assuming it's because they are using jQuery syntax which does not work. Is there a way to get this gallery to work with targeting a class instead of an ID? It would be nice if there was a way to use jQuery syntax since it's so convenient.