2017-08-03 73 views
0

我正在使用owl-carousel,我試圖替換owl-stage-outer類,owl-wrapper-outer 不幸的是,我找不到允許我這樣做的文檔中的任何選項。 這裏我傳送帶的初始化:更改貓頭鷹傳送帶包裝類?

$("#owl-featured").owlCarousel({ 
     nav: true, 
     navText : ['<i class="fa fa-angle-left" aria-hidden="true"></i>','<i class="fa fa-angle-right" aria-hidden="true"></i>'], 
     items : 3, 
     itemsDesktop : [1440,3], 
     itemsDesktopSmall : [1024,3], 
     itemsTablet: [768,2], 
     itemsTabletSmall: [719,1], 
     itemsMobile : [479,1], 
    }); 

所以本質上是結構,而不是這樣的:

<div id="owl-featured" class="owl-carousel owl-theme owl-loaded owl-drag"> 
    <div class="owl-stage-outer"> 

應該是這樣的:

<div id="owl-featured" class="owl-carousel owl-theme owl-loaded owl-drag"> 
    <div class="owl-wrapper-outer"> 

我該怎麼辦呢?感謝

回答

1

您可以使用在文檔中給出stageOuterClass:'your class here'

JS

$('.owl-carousel').owlCarousel({ 
     stageOuterClass:'owl-wrapper-outer', 
    margin:10, 
    nav:true, 
}); 

link for reference

+0

哦,謝謝你這個選項的,沒看見它,謝謝 –