Reputation: 2735
I'm trying to setup lightgallery with lg-thumbnail plugin in a WordPress installation.
https://sachinchoolur.github.io/lightGallery/docs/api.html
https://sachinchoolur.github.io/lightGallery/docs/api.html#lg-thumbnial
Lightgallery alone seems to work without problems (so, HTML markup and enqueued script is OK) with this JS init:
$(document).ready(function() {
$("#gallery-1").lightGallery();
});
So, my next step is to include lg-thumbnail plugin. After enqueue plugin JS I add thumbnail:true
:
$(document).ready(function() {
$("#gallery-1").lightGallery({
thumbnail:true
});
});
But nothing happens. There is no errors in the console. Seems like there is no lg-thumbnail plugin present at all.
But, script is in its place:
What am I doing wrong? How can I diagnose the problem? Thank you!
Upvotes: 2
Views: 1874
Reputation: 2735
Sorry about that, everything works fine, including thumbnail plugin. I was worng with what was the plugin function. I thought that this plugin acts on the thumbnails before lightbox was launched, but actually insert thumbnails in the lightbox after it is launched.
My apologies.
Upvotes: 1