[英]jcarousel is not scrolling through images
i have a jcarousel gallery of images 我有一个jcarousel图像库
but the jcarousel is not working at all it's not scrolling through images at all 但jcarousel根本不工作它根本不滚动图像
this is my code : 这是我的代码:
<ul id="mycarousel" class="jcarousel-skin-tango">
<?php foreach ($images as $image_item) : ?>
<li><img src="<?php echo $image_item['Path']; ?>"/></li>
<?php endforeach; ?>
</ul>
and this is my css : 这是我的css:
.jcarousel-skin-tango .jcarousel-container {
width:500px;
height:250px;
background: none;
border: none;
}
.jcarousel-skin-tango .jcarousel-container-horizontal {
height:250px;
padding: 20px 40px;
}
.jcarousel-skin-tango .jcarousel-clip-horizontal {
width: 500px;
height: 250px;
}
.jcarousel-skin-tango .jcarousel-item {
width: 500px;
height: 250px;
}
.jcarousel-skin-tango .jcarousel-item-horizontal {
margin-left: 0;
margin-right: 10px;
}
and there is my js : 还有我的js:
$(document).ready(function(){
$('#mycarousel').jcarousel({wrap:'circular'});
});
Your code is almost correct — you just need to add "auto: 1" (or some other non-zero number of seconds) and it'll start auto-scrolling. 你的代码几乎是正确的 - 你只需要添加“auto:1”(或其他一些非零秒数),它就会开始自动滚动。 If you don't want auto-scroll, you need to specify the "buttonNextHTML" and "buttonPrevHTML" parameters to get buttons.
如果您不想自动滚动,则需要指定“buttonNextHTML”和“buttonPrevHTML”参数来获取按钮。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.