因此,我在同一頁上使用兩個貓頭鷹傳送帶來瀏覽一些數據。問題是,它總是顯示2項而不是1貓頭鷹傳送帶沒有顯示1項
代碼:
$('#owl_radio_1').owlCarousel({
item:1,
loop:true,
margin:10,
autoplay:true,
autoplayTimeout:3000,
autoplayHoverPause:false
});
$('#owl_radio_2').owlCarousel({
item:1,
loop:true,
margin:10,
autoplay:true,
autoplayTimeout:3000,
autoplayHoverPause:false
});
HTML/PHP:
<div id="owl_radio_<?php echo $x; ?>" class="owl-carousel">
<?php foreach($items as $item): ?>
<h3><?php echo $item; ?></h3>
<?php endforeach; ?>
</div>
$x
是由每次迭代上升的值。所以在這種情況下,它在2
你能告訴我們的html代碼 – Goku
@Goku更新後 –