PhotoSwipe
PhotoSwipe copied to clipboard
Multiple gallery
Thanks for the great plugin. I know there is an example of multiple gallery, so I know it should work, but for some reason I can't make it right. https://codepen.io/levipadre/pen/xxVGeRK
The galerries are actually working, but act as one. A little help would be really great. Thanks!
Both have same class so all pictures get added by
var gallery = document.querySelectorAll('.gallery');
Maybe helps: https://github.com/andi34/photobooth/blob/dev/src/js/photoinit.js
If I am not wrong, you could init for each query selector simply by:
initPhotoSwipeFromDOM('.gallery1');
initPhotoSwipeFromDOM('.gallery2');
(Haven't tested to use multiple galleries)
https://github.com/dimsemenov/PhotoSwipe/issues/1631