A
A
Anarchy2017-11-16 19:46:04
fancyBox
Anarchy, 2017-11-16 19:46:04

Slick slider and fancy box. How to make it work together?

When opening a fancybox window, the slider is not rendered. Tried these options:

$('#fancybox').fancybox({
        autoSize: true,
        afterShow: function() {
            var main = '#slick';
            var support = '#slick2';
            $('.popup_slider,.gallery_slider').slick({
    infinite: true,
    dots: false,
    arrows: true
  });
        }
    });

$('[data-fancybox]').fancybox({
    autoFocus : false,
    afterLoad: function(){
      $('.popup_slider,.gallery_slider').slick({
    infinite: true,
    dots: false,
    arrows: true
  });
    },
    afterClose: function(){
      $('.popup_slider').slick('unslick');
    }
  });

And on another site, the second option works. There are no errors in js.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kvsemenoff, 2018-03-04
@kvsemenoff

Here is the solution - lantana-studio.ru/blog/slajder-dlya-kartochki-tovara

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question