【问题标题】:PhotoSwipe multiple galleries on one sitePhotoSwipe 在一个站点上的多个画廊
【发布时间】:2014-12-05 08:55:39
【问题描述】:

我使用 yag-gallery 扩展和 PhotoSwipe 在基于 Typo3 的主页上使用 PhotoSwipe。我在一个站点上有 5 个画廊。当我单击其中一个画廊中的图像时,仅显示最后一个画廊的图像。

HTML 如下所示:

<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">

这是调用 PhotoSwipe 的 jQuery:

$(document).ready(function(){
    var myGallery = $(".yag-gallery").each(function(){
        $(this).find("a").photoSwipe();
    });
});

有人知道我如何单独调用每个画廊吗?

【问题讨论】:

    标签: jquery typo3 photoswipe


    【解决方案1】:

    不确定是否有帮助,但请参阅my answer here,了解我如何在一页上解决多个画廊。我基本上是通过让 PhotoSwipe 页面正常工作,然后使用 object 多次嵌入它来实现它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-01
      • 2019-04-05
      • 1970-01-01
      • 1970-01-01
      • 2023-04-05
      相关资源
      最近更新 更多