How to make fancybox and swiper friends?

  • 0
    The crux of the problem:
    There are 3 elements in the swiper slider,
    But when you open the code in a browser, the swiper duplicates these sliders and, as a result, I have like 7 elements in the slider.
    And when pressed, fancybox with 7 pictures is triggered.
    How to make fancybox take only original elements without duplicates. I think it is possible through the class, but how?
    JavaScript Anonymous, Aug 4, 2019

  • 3 Answers
  • 0
    They have everything in their documentation, and this particular case is also described and even an example is given)

    https://codepen.io/fancyapps/pen/NLQZBr?editors=1010
    Anonymous

  • 0
    I couldn't find a solution to fix the bug while looping.

    The only solution is not to make it loop.
    Anonymous

  • 0
    And what prevents from registering a selector to a fanbox like: not (.swiper-slide-duplicate)?
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!