[英]jquery.flexslider: touch on thumbnail slider not working on iOS
I'm using flex-slider's thumbnail controlnav for my slideshow. 我正在为幻灯片使用flex-slider的缩略图控件。 it works just fine on PC and Mac but on my iphone touching a thumbnail doesn't change the main slider's image.
它可以在PC和Mac上正常工作,但在我的iPhone上触摸缩略图不会改变主滑块的图像。 I haven't altered the jquery.flexslider.js file at all.
我根本没有更改jquery.flexslider.js文件。 The demo of the controlnav from the official site seems to work fine on my phone though.
官方网站上的controlnav演示似乎在我的手机上运行良好。 I don't have my own Mac so I cant debug with my phone directly :/.
我没有自己的Mac,因此无法直接用手机进行调试:/。 Has anyone else encountered this problem?
还有其他人遇到过这个问题吗? Let me know if you need me to post html or any other code.
让我知道您是否需要我发布html或任何其他代码。
Here's what it should be doing: http://flexslider.woothemes.com/thumbnail-slider.html 这是应该做的事情: http : //flexslider.woothemes.com/thumbnail-slider.html
Here's what I have for my slider declaration: 这是我的滑块声明的内容:
$('#carousel').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 210,
itemMargin: 5,
asNavFor: '#slider'
});
// The slider being synced must be initialized first
$('#carousel').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 150,
itemMargin: 0,
asNavFor: '#slider'
});
If I replace it with the demo code the touch works, but it also creates a bunch of extra empty boxes 如果我将其替换为演示代码,则触摸效果良好,但它还会创建一堆额外的空框
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
controlNav: "thumbnails"
});
});
thanks! 谢谢!
Will 将
I think you need to flip the items - you're calling flexslider on #carousel
twice but never on #slider
. 我认为你需要翻转的物品-你在打电话flexslider
#carousel
上两次,但从来没有#slider
。 One is being synced, the other is the nav. 一个正在同步,另一个是导航。
$('#carousel').flexslider({
asNavFor: '#slider'
});
// The slider being synced must be initialized first
$('#slider').flexslider({
sync: '#carousel'
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.