• Magnific popup + Слайдер внутри. Как сделать?

    KickeRocK
    @KickeRocK
    FrontFinish
    Запускайте слайдер, когда открывается всплывашка
    $('.open-popup-link').magnificPopup({
         
      type:'inline',
      midClick: true, // Allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source in href.
    });
    $('.open-popup-link').click(function(){
    var swiper = new Swiper('.swiper-container', {
                spaceBetween: 0,
                centeredSlides: true,
                autoplay: {
                  delay: 400,
                  disableOnInteraction: false,
                },
                pagination: {
                  el: '.swiper-pagination',
                  clickable: true,
                },
                navigation: {
                  nextEl: '.swiper-button-next',
                  prevEl: '.swiper-button-prev',
                },
              });
    });

    Вот так попробуйте.
    Ответ написан
    2 комментария