I use PhotoSwipe on Typo3 based homepage using the yag-gallery extension and PhotoSwipe. I have 5 galleries on one site. When I click an image in one of the galleries, only the images of the last gallery are shown.
The HTML looks like this:
<div class="row col span_12">
<div class="headlines">
<div class="tx-yag-pi1 theme-photoswipe">
<div id="yag-c84" class="yag-list-wrap yag-gallery">
<ul>
<div class="tx-yag-items gallery-row">
<li id="yag_2" class="tx-yag-thumb-outerframe yag-item-thumb-outerframe gallery-item">
<div class="tx-yag-thumb-innerframe yag-item-thumb-innerframe">
<a class="gallery-link" href="typo3temp/yag/02/test1.jpg">
<img class="gallery-img" width="150px" height="150px" src="typo3temp/yag/00/test1.jpg" title="test" alt="test">
</a>
</div>
</li>
<li id="yag_3" class="tx-yag-thumb-outerframe yag-item-thumb-outerframe gallery-item">
<li id="yag_4" class="tx-yag-thumb-outerframe yag-item-thumb-outerframe gallery-item">
<li id="yag_5" class="tx-yag-thumb-outerframe yag-item-thumb-outerframe gallery-item">
<li id="yag_6" class="tx-yag-thumb-outerframe yag-item-thumb-outerframe gallery-item">
</div>
</ul>
</div>
</div>
</div>
<div class="row col span_12">
<div class="row col span_12">
<div class="row col span_12">
<div class="row col span_12">
This is the jQuery to call PhotoSwipe:
$(document).ready(function(){
var myGallery = $(".yag-gallery").each(function(){
$(this).find("a").photoSwipe();
});
});
Has anyone got any idea how I can call each gallery individually?