1

Using photoswipe, I want to be able to launch multiple galleries on a same page, without any thumbnails.

Based on this demo http://codepen.io/dimsemenov/pen/ZYbPJM , galleries are launched from a clic on a thumbnail. I don't want to display any thumbnails on the page, but I want to be able to trigger the selected gallery from a link (class="trigger-link') based on the markup in the snippet below.

How do I bind opening selected gallery on a link instead of the thumbnail, based on the codepen demo?

<article class="gallery">
  <a class="trigger-link" href="">
    <h1>Gallery 1</h1>
  </a>
  <div class="gallery__items">
    <figure>
      <img src="https://source.unsplash.com/random" data-size="1200x800">
    </figure>
    <figure>
      <img src="https://source.unsplash.com/category/nature/weekly" data-size="1200x800">
    </figure>
  </div>
</article>
<article class="gallery">
  <a class="trigger-link" href="">
    <h1>Gallery 2</h1>
  </a>
  <div class="gallery__items">
    <figure>
      <img src="https://source.unsplash.com/dategory/city/daily" data-size="1200x800">
    </figure>
    <figure>
      <img src="https://source.unsplash.com/category/nature/daily" data-size="1200x800">
    </figure>
  </div>
</article>
  • Can you be specific on what your question is. Also, welcome to stackoverflow! I recommend you read this article on how to post a good question: https://stackoverflow.com/help/how-to-ask – bdkopen May 13 '17 at 15:55
  • sorry If this wasn't clear enough, I tried to be more specific and edited the post. – Jérémie Le Scoëzec May 13 '17 at 16:07
  • What does your js look like specifically? I can't run your snippet correctly without it. – bdkopen May 14 '17 at 02:33

0 Answers0