答案 0 :(得分:1)
要同时使用更多的猫头鹰旋转木马,只需使用不同的" id"
$(document).ready(function() {
$("#owl-demo1").owlCarousel();
$("#owl-demo2").owlCarousel();
});
<div id="owl-demo1" class="owl-carousel">
<div class="item"><img src="slide1.jpg"></div>
<div class="item"><img src="slide2.jpg"></div>
<div class="item"><img src="slide3.jpg"></div>
<div class="item"><img src="slide4.jpg"></div>
<div class="item"><img src="slide5.jpg"></div>
<div class="item"><img src="slide6.jpg"></div>
</div>
<div id="owl-demo2" class="owl-carousel">
<div class="item"><img src="slide7.jpg"></div>
<div class="item"><img src="slide8.jpg"></div>
<div class="item"><img src="slide9.jpg"></div>
<div class="item"><img src="slide10.jpg"></div>
<div class="item"><img src="slide11.jpg"></div>
<div class="item"><img src="slide12.jpg"></div>
</div>
答案 1 :(得分:0)
<强> HTML 强>
$(function() {
//user could hit enter in the input field, bind on submit instead
$("form[name='classified']").on('submit', function() {
var $classified = $('input[name="classified"]');
console.log($classified.val());
});
});
<强>的JavaScript 强>
<div class="crousel-set">
<div class="item"><img src="slide1.jpg"></div>
<div class="item"><img src="slide2.jpg"></div>
<div class="item"><img src="slide3.jpg"></div>
<div class="item"><img src="slide4.jpg"></div>
<div class="item"><img src="slide5.jpg"></div>
<div class="item"><img src="slide6.jpg"></div>
</div>
<div class="crousel-set">
<div class="item"><img src="slide7.jpg"></div>
<div class="item"><img src="slide8.jpg"></div>
<div class="item"><img src="slide9.jpg"></div>
<div class="item"><img src="slide10.jpg"></div>
<div class="item"><img src="slide11.jpg"></div>
<div class="item"><img src="slide12.jpg"></div>
</div>