I'm using Photoswipe on blog posts that contain mixed content, like images, but also text, videos etc., not so much separate galleries with just images. Executing Photoswipe on the entire post seems to apply to more than the <figure>
elements alone, so I'm looking to be a bit more specific. I would like to invoke Photoswipe only on the <figure>
elements, but I'm at a bit of a loss on how I would do that.
I think the main idea here is that this variable:
var thumbElements = el.childNodes
...should be more specific. So I need something like this to work:
var allElements = el.childNodes,
thumbElements = allElements.getElementsByTagName("figure");
Except that doesn't work. Later on in the code, the figure elements are defined separately:
figureEl = thumbElements[i]; // <figure> element
So I'm a little lost here... I'd appreciate any help.