How to display a block with an index that corresponds to the index of the active slide?

  • 0
    Greetings.
    The task is to show the block, the index of which corresponds to the index of the central active slide.
    There is a slider on the page, it displays 3 active slides. There is a function that adds the class .owl-center
    to the central slide Below the slider is a block containing blocks with content.
    You need to find out the index of the central slide and assign the class .active

    to the block with the same index When trying to find out the index of the center slide, it always returns -1.
    Please help me figure it out.

    Here's an example: https://codepen.io/OculusDaemon/pen/vVWmOR
    < br /> P.S Using owl-carousel with loop: false
    jQuery Blake Kane, Feb 25, 2020

  • 1 Answers
  • 0
    same
    Anonymous

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