W
W
WildKayote2017-02-08 22:41:52
JavaScript
WildKayote, 2017-02-08 22:41:52

Fancybox and slick. Why do slides stick together?

When opening a fancybox popup window, the slides overlap each other. If you flip the slide - everything gets up as it should. link . " products " screen , " knife " block

$('.popup').fancybox({
        afterShow: function() {
            $('#product__slider').slick('setPosition');
        },
  });

  $('#product__slider').not('.slick-initialized').slick({
     slidesToShow: 1,
     slidesToScroll: 1,
     arrows: false,
     dots: true,
     infinite: true,
     centerMode: false,
  });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WildKayote, 2017-02-08
@WildKayote

The problem was solved by changing the callback from " afterShow " to " beforeShow "

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question