1

I'm using http://photoswipe.com/ to generate a photo gallery on my website, it works fine, but when I add a div inside the gallery loop, it only show some images.

Here is my HTML code: https://jsfiddle.net/mjuut2um/

I'm setting the gallery parent using:

initPhotoSwipeFromDOM('.demo-gallery');

Any idea on how to fix it?

Bruno Monteiro
  • 712
  • 6
  • 22

2 Answers2

1

Default init code from the documentation is very strict on the markup that you pass, as it doesn't use jQuery.

Modify parseThumbnailElements to fit your requirements, every line is self-explanatory, e.g. perform a check if current element is a figure.

Dmitry Semenov
  • 4,566
  • 2
  • 36
  • 39
0

It could be something to do with the extension?