[英]Nivo Lightbox notopening on an iPhone, but does work on iPad
Here is a URL with images that you can test this out on: 这是带有图片的URL,您可以在上面进行测试:
http://www.imageworkshop.com/2013/06/19/dance-performer-promo-photography/ http://www.imageworkshop.com/2013/06/19/dance-performer-promo-photography/
To be clear - at one point, all these images were opening on my iPhone in the Nivo lightbox. 明确地说-所有这些图像都在我的iPhone的Nivo灯箱中打开。 But it has been inconsistent.
但这并不一致。 For a while, some blog post images would open, others would not.
有一阵子,某些博客文章图像会打开,而另一些则不会。
At present, none of them seem to be opening in the nivo lightbox on the iPhone - it is however, working on the iPad?! 目前,它们似乎都没有在iPhone的nivo灯箱中打开-但是,它是否在iPad上工作?
The following code in my header is relevant to the Nivo Lightbox (initiating the lightbox and also adding swipe functionality): 标头中的以下代码与Nivo灯箱相关(启动灯箱并添加滑动功能):
<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>
This is an example of how the images are wrapped up. 这是如何包装图像的示例。 If you have any suggestions on why this isn't working I'd appreciate the help!
如果您对为何无法正常使用有任何建议,我们将为您提供帮助!
<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 DETAILS: The javascript can be viewed here: https://github.com/gilbitron/Nivo-Lightbox/blob/master/nivo-lightbox.js NIVO LIGHTBOX详情:可在此处查看javascript: https : //github.com/gilbitron/Nivo-Lightbox/blob/master/nivo-lightbox.js
CSS can be viewed here: https://github.com/gilbitron/Nivo-Lightbox/blob/master/nivo-lightbox.css 可以在这里查看CSS: https : //github.com/gilbitron/Nivo-Lightbox/blob/master/nivo-lightbox.css
This appears to have resolved itself. 这似乎已经解决了。 I have also upgrade to the new v1.1 of the NIVO LIGHTBOX plugin, which might also be helping (although this was not the direct resolution to the issue)
我还升级到了NIVO LIGHTBOX插件的新v1.1,这可能也会有所帮助(尽管这不是直接解决问题的方法)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.