G
G
g9052019-07-27 00:52:49
Owl Carousel
g905, 2019-07-27 00:52:49

How to use Owl Carousel + mixitup?

There is a mixitup container, which is also an owl carousel container.

<div class="mixitup-controls">
                    <button type="button" class="btn mx-controls-btn active" data-filter="all">Все</button>
                    <button type="button" class="btn mx-controls-btn" data-filter=".category-a">SEO продвижение сайта 1</button>
                    <button type="button" class="btn mx-controls-btn" data-filter=".category-b">SEO продвижение сайта 2</button>
                    <button type="button" class="btn mx-controls-btn" data-filter=".category-c">SEO продвижение сайта 3</button>
                </div>
<!-- ... -->
                <div class="mixitup-container d-flex owl-carousel owl-theme">
                    <div class="mix category-a" data-order="1">dsfa</div>
                    <div class="mix category-b" data-order="2">fdsa</div>
                    <div class="mix category-b category-c" data-order="3">werfd</div>
                    <div class="mix category-a category-d" data-order="4">dfga</div>
                </div>

And it supposedly works. But! Elements filtered by mixitup remain empty in the Owl carousel. How to make sure that after filtering, invisible elements are truly hidden (Maybe it can somehow be configured so that elements that do not fall into the filter are removed from the DOM, and those that fall into the filter are embedded in it?)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question