2

From the document of PhotoSwipe I got the below snippet.

<div class="my-gallery" itemscope itemtype="http://schema.org/ImageGallery">

    <figure itemscope itemtype="http://schema.org/ImageObject">
        <a href="large-image.jpg" itemprop="contentUrl" data-size="600x400">
            <img src="small-image.jpg" itemprop="thumbnail" alt="Image description" />
        </a>
        <figcaption itemprop="caption description">Image caption</figcaption>
    </figure>

    <figure itemscope itemtype="http://schema.org/ImageObject">
        <a href="large-image.jpg" itemprop="contentUrl" data-size="600x400">
            <img src="small-image.jpg" itemprop="thumbnail" alt="Image description" />
        </a>
        <figcaption itemprop="caption description">Image caption</figcaption>
    </figure>

</div>

The document at http://photoswipe.com/documentation/getting-started.html does not explain how to easily invoke the PhotoSwipe on the images. It does give some long code to do but I am not happy to use that as its too complex.

The document says if I use jQuery, the code can be made simpler.

If you use frameworks like jQuery or MooTools, or if you don't need to support IE8, code can be simplified dramatically.

But I am not able to find it in the docs or in search. So how should I invoke PhotoSwipe based on this?

user3195347
  • 55
  • 1
  • 7

1 Answers1

-2

I found this on github

https://gist.github.com/di5abled/d8d84af3be5e1bf12507

hope this helps

  • edit -

I followed this tutorial successfully, sorry for the first link

http://webdesign.tutsplus.com/tutorials/the-perfect-lightbox-using-photoswipe-with-jquery--cms-23587