O
O
OculusDaemon2018-10-15 17:34:08
JavaScript
OculusDaemon, 2018-10-15 17:34:08

How to show a block with an index that matches the index of the active slide?

Greetings.
The task is to show a block whose index 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 a class to the central slide .owl-center
. Under the slider there is a block in which blocks with content.
It is necessary to find out the index of the central slide and assign a class to the block with the same index. .active

When trying to find out the index of the central slide, it always returns -1.
Help, please, to understand.

Here is an example: https://codepen.io/OculusDaemon/pen/vVWmOR

PS I am using owl-carousel with the valueloop: false

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jupiter Max, 2018-10-15
@vardoLP

here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question