Is there a way to dynamically add images to the photoswipe gallery after creating it.
The situation is as follows.
I extract the URLs of the images from the section and display them in the gallery. As the elements load, anchor and img elements are added to the page. I would like to be able to add them to the photoswipe gallery at the same time.
currently in the element callback (after loading the image and adding the elements) I have
$elements.photoSwipe({ enableMouseWheel: false , enableKeyboard: false });
This works, except that it creates each item in its own gallery. Is there a way to get a handle to an existing gallery and just add to it?
source
share