T
T
tvelforce2017-05-15 00:55:29
JavaScript
tvelforce, 2017-05-15 00:55:29

How to restart owl carousel after loading slides?

Good day.
There is a Carousel in the application on vue:
$('.selection_slider').owlCarousel();
There is the application itself

el: '#selection',
    
    data: {
      data: data,
      assort: []
    },

    methods:{
      gobrand: function (id) {		
        this.assort = this.data[id].assort;
          refresh(); // Здесь нужно переинициализировать слайдер
        },
    },

Tried to do like this:
var $owl = $('.selection_slider').owlCarousel();

    function refresh() {
    	$owl.trigger('refresh.owl.carousel');
  }

But it didn't work, please help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vism, 2017-05-15
@tvelforce

try like this

methods:{
      gobrand: function (id) {		
        this.assort = this.data[id].assort;
           $('.selection_slider').trigger('refresh.owl.carousel');
    },

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question