我在引导程序中使用owl carousel。但是当我在bootstrap模式中使用它时,它无法正常工作。我如何解决这个问题,请帮帮我......
这里是代码:
jQuery('.portfolio-modal-active').owlCarousel({
loop: true,
nav: false,
margin: 0,
dots: true,
animateOut: 'fadeOut',
touchDrag: false,
mouseDrag: false,
autoplay: true,
autoplayHoverPause: true,
autoplayTimeout: 4000,
smartSpeed: 2000,
responsive: {
0: {
items: 1,
}
}
})
模态正文是:
<div class="modal-body">
<div class="row">
<div class="col-md-12">
<div class="portfolio-modal-active">
<div class="portfolio-slider-item">
<img src="<?php echo get_template_directory_uri (); ?>/img/home-slider/slider_1.jpg" alt="Slider Image" />
</div>
<div class="portfolio-slider-item">
<img src="<?php echo get_template_directory_uri (); ?>/img/home-slider/slider_2.jpg" alt="Slider Image" />
</div>
</div>
</div>
</div>
</div>