我在这里使用以下的boostrap片段代码:http://bootsnipp.com/snippets/featured/infinite-carousel-loop
此轮播用于一次显示3张幻灯片的javascript是:
<script>
$('#myCarousel').carousel({
interval: 40000
});
$('.carousel .item').each(function(){
var next = $(this).next();
if (!next.length) {
next = $(this).siblings(':first');
}
next.children(':first-child').clone().appendTo($(this));
if (next.next().length>0) {
next.next().children(':first- child').clone().appendTo($(this)).addClass('rightest');
}
else {
$(this).siblings(':first').children(':first-Child').clone().appendTo($(this));
}
});
</script>
我试图修改这个java以应用&#34; .rightest&#34;上课到第4或第5张幻灯片而不是第3张,但我尝试的所有内容都没有用。我真的不精通javascript,我尝试检查上面链接的评论中找到的建议,但它们不起作用,你不能完成超过3张幻灯片而不更改javascript并更改该类的分配位置。任何帮助将不胜感激。