I'm having trouble using lightGallery() as a callback; I'm trying to use this in Shopify when a customer is selecting product options.
For example, I have a div #lightgallery
that has 5 images, and after the page loads, $("#lightgallery").lightGallery();
is called.
When a customer chooses a product variant, the previous 5 images in #lightgallery
are removed, a new 4 images of the variant are created, but $("#lightgallery").lightGallery();
doesn't initialize the new gallery for the variant.