Javascript 如何将.owl分页移到主owl包装器之外?猫头鹰旋转木马2
如果有一种简单的方法将.owl分页移动到主owl包装器之外的另一个div,那就太好了。想知道是否有一种简单的方法来实现这一点?您可以在init之后移动导航,如本例所示:Javascript 如何将.owl分页移到主owl包装器之外?猫头鹰旋转木马2,javascript,owl-carousel,Javascript,Owl Carousel,如果有一种简单的方法将.owl分页移动到主owl包装器之外的另一个div,那就太好了。想知道是否有一种简单的方法来实现这一点?您可以在init之后移动导航,如本例所示: 您可以在init之后移动导航,如本例所示: 它使用标准选项:navContainer和dotsContainer html 对于OwlCarousel2问题,它使用标准选项:navContainer和dotsContainer html 对于传送带问题 $(document).ready(function() { $(
您可以在init之后移动导航,如本例所示:
它使用标准选项:navContainer和dotsContainer html
对于OwlCarousel2问题,它使用标准选项:navContainer和dotsContainer html 对于传送带问题
$(document).ready(function() {
$("#owl-demo").owlCarousel({
navigation:true,
afterInit : function(elem){
var that = this
that.owlControls.prependTo(elem)
}
});
});
<!-- html custom containers -->
<div id="customNav" class="owl-nav"></div>
<div id="customDots" class="owl-dots"></div>
$('#owl-carousel').owlCarousel({
// move navContainer outside the primary owl wrapper
navContainer: '#customNav',
// move dotsContainer outside the primary owl wrapper
dotsContainer: '#customDots',
// other OwlCarousel2 options
})