Nivo Lightbox无法在iPhone上打开,但可以在iPad上运行

时间:2013-11-26 05:20:41

标签: javascript css lightbox nivo-slider

以下是包含图片的网址,您可以对其进行测试:

http://www.imageworkshop.com/2013/06/19/dance-performer-promo-photography/

要清楚 - 在某一点上,所有这些图像都在我的iPhone上在Nivo灯箱中打开。但它一直不一致。有一段时间,一些博客文章图片会打开,有些则不会。

目前,它们似乎都没有在iPhone上的nivo灯箱中打开 - 然而,它正在iPad上工作?!

我标题中的以下代码与Nivo Lightbox相关(启动灯箱并添加滑动功能):

    <script src="<?php bloginfo('stylesheet_directory') ?>/js/nivo-lightbox.min.js"></script>
    <script>
    jQuery(document).ready(function(){          
            jQuery('a.jig-link').nivoLightbox({effect: 'slideRight'});
            jQuery('.lightbox').nivoLightbox({effect: 'slideRight'});                   
    });
    </script>       
    <script src="<?php bloginfo('stylesheet_directory') ?>/js/jquery.touchwipe.min.js"></script>
    <script>    
    jQuery(document).ready(function(){
        jQuery('body').touchwipe({
            wipeLeft: function(){ jQuery(".nivo-lightbox-next").click(); },
            wipeRight: function(){ jQuery(".nivo-lightbox-prev").click(); },
             min_move_x: 70,
             min_move_y: 70,                 
             preventDefaultEvents: false                 
        });
    });     
    </script>

这是图像如何被包裹的一个例子。如果您对为什么这不起作用有任何建议,我会非常感谢您的帮助!

<div id="attachment_2143" class="wp-caption aligncenter" style="width: 570px">
<a class="lightbox" title="Dance performers: promotional dance photography" 
 data-lightbox-gallery="gallery1" href="http://www.imageworkshop.com/wp-content/uploads/2013/06/13006-0047-Image-Workshop-Melbourne-photography.jpg">
<img class="size-large wp-image-2143 " width="560" height="560" src="http://www.imageworkshop.com/wp-content/uploads/2013/06/13006-0047-Image-Workshop-Melbourne-photography-560x560.jpg" alt="Promotional dance photography by Sharon Blance of the Image Workshop" title="Promotional dance photography by Sharon Blance of the Image Workshop">
</a>
<p class="wp-caption-text">Pete & Steph</p>
</div>

NIVO LIGHTBOX详情: 可在此处查看javascript:https://github.com/gilbitron/Nivo-Lightbox/blob/master/nivo-lightbox.js

可在此处查看CSS:https://github.com/gilbitron/Nivo-Lightbox/blob/master/nivo-lightbox.css

1 个答案:

答案 0 :(得分:0)

这似乎已经解决了。我还升级到了NIVO LIGHTBOX插件的新v1.1,这可能也有帮助(虽然这不是问题的直接解决方案)