📜  swiperjs 在模态中不起作用 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:49.798000             🧑  作者: Mango

代码示例1
$(document).ready(function(){
    $(".modal").on('show.bs.modal', function() {
        setTimeout(function() {
            var swiper3 = new Swiper('.swiper-container', {
                pagination: '.swiper-pagination',
                nextButton: '.swiper-button-next',
                prevButton: '.swiper-button-prev',
                slidesPerView: 1,
                spaceBetween: 30,
                loop: true,
                effect: 'fade'
            });
        }, 500);
    });
});