2

I have setup photoswipe as per the tutorial on here http://photoswipe.com/documentation/getting-started.html and used the example of code about half way down under "How to build an array of slides from a list of links", copied it out and it works fine when I put in my image paths, nothing wrong with it except the fact that images are scattered all over the place.

<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
   <a href="images/gallery/1.jpg" itemprop="contentUrl" data-size="1500x1000">
   <img src="images/gallery/tn/1.jpg" itemprop="thumbnail" alt="" />
   </a>
   <!-- <figcaption itemprop="caption description">Image caption 2</figcaption> -->
</figure>
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
   <a href="images/gallery/2.jpg" itemprop="contentUrl" data-size="1500x1000">
   <img src="images/gallery/tn/2.jpg" itemprop="thumbnail" alt="" />
   </a>
   <!-- <figcaption itemprop="caption description">Image caption 2</figcaption> -->
</figure>
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
   <a href="images/gallery/3.jpg" itemprop="contentUrl" data-size="870x1054">
   <img src="images/gallery/tn/3.jpg" itemprop="thumbnail" alt="" />
   </a>
   <!-- <figcaption itemprop="caption description">Image caption 2</figcaption> -->
</figure>
<figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
<a href="images/gallery/4.jpg" itemprop="contentUrl" data-size="1200x1200">
<img src="images/gallery/tn/4.jpg" itemprop="thumbnail" alt="" />
</a>
<!-- <figcaption itemprop="caption description">Image caption 2</figcaption> -->

I used the code from somewhere else I cant remember now that is just a css class that adds to the above as follows

Image caption 2 --> Image caption 2 --> Image caption 2 --> Image caption 2 -->

Once I add in all the and close that's when the photoswipe script stops working, it will only open up the image I click on but I cannot move to the next image and it does not display the top left corner the number of images there, it only sees one image. anyone know whats wrong here???

Wozzzzza
  • 41
  • 4
  • Please rewrap your pasted code. In that process, you should be able to find the missing closing tags that may be causing your issues. Code blocks that don't require scrolling are far more legible and more likely to attract help. – Adam Katz Jul 28 '16 at 17:26
  • Possible duplicate of [PhotoSwipe: edit parseThumbnailElements function to parse additional markup element](http://stackoverflow.com/questions/33526838/photoswipe-edit-parsethumbnailelements-function-to-parse-additional-markup-elem) – Eljas Aug 17 '16 at 23:18

0 Answers0