Q
Q
qwerty17772018-07-04 09:18:05
css
qwerty1777, 2018-07-04 09:18:05

How to update data in owl carousel 2?

Good time. There is an owl slider in a react application. There is some text in the slides, and so when changing the language, the slider does not want to redraw the new data. That is, he partially does this, namely, on some slides he changes the language, on some he does not. I'm trying to use refresh.owl.carousel but it doesn't help. Here is the code:

componentDidMount() {

    $(document).ready(function(){
      $('.owl-carousel').owlCarousel({
        items:1,
        nav: false,
        loop: true,
        margin:5,
        autoplay: true,
        autoplayTimeout: 7000,
        autoplayHoverPause: true,

        responsive: {
          751: {
            items:2
          }
        }
      })

      $('.owl-carousel').trigger('refresh.owl.carousel')

    })
  }

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