我正在使用Magnific Popup。
我可以让它与画廊合作。
$(document).ready(function() {
    $('.popup-gallery').magnificPopup({
        delegate: 'a',
        type: 'image',
        gallery: {
            enabled: true,
            navigateByImgClick: true,
        }
    });
});
我实际上也可以将内联元素与图像混合,这基本上是我想要的:
$('#open-popup').magnificPopup({
    items: [
      {
        src: 'http://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Peter_%26_Paul_fortress_in_SPB_03.jpg/800px-Peter_%26_Paul_fortress_in_SPB_03.jpg',
        title: 'Peter & Paul fortress in SPB'
      },
      {
        src: 'http://vimeo.com/123123',
        type: 'iframe' // this overrides default type
      },
      {
        src: $('<div class="white-popup">Dynamically created element</div>'), // Dynamically created element
        type: 'inline'
      },
      {
        src: '<div class="white-popup">Popup from HTML string</div>', // HTML string
        type: 'inline'
      },
      {
        src: '#my-popup', // CSS selector of an element on page that should be used as a popup
        type: 'inline'
      }
    ],
    gallery: {
      enabled: true
    },
    type: 'image' // this is a default type
});
我的问题是,在混合示例中,我没有显示缩略图“画廊”,我基本上想要的是缩略图,当点击它时表现得像画廊,但中间有一个内联元素。
内联元素将有一个缩略图(和实际图像),但单击时将是一个内联元素。
我可以用fancybox做到这一点,如果你点击缩略图,你可以在这里看到,它可能有助于澄清我需要什么。(由于缺乏移动设备的移动支持,我正在尝试使用 Magnific 弹出窗口来实现相同的目标)。