改变owl-carousel包装类?

时间:2017-08-03 11:23:02

标签: javascript html owl-carousel

我正在使用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 个答案:

答案 0 :(得分:1)

您可以使用文档stageOuterClass:'your class here'

中提供的此选项

JS

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

link for reference