Rubberduck1337106092
Rubberduck1337106092

Reputation: 1344

How to reload flexslider after slider is refreshed with AJAX?

My slider is working when the page loads.

Then i make an ajax call and return new slides inside the slider and it gets deactivated (ofcourse) enter image description here

Is there a way to reinitiate the flexslider so that it starts again with the other images?

$('.flexslider').flexslider({
    animation: "slide",
    controlNav: false,
});

Thanks in advance

Upvotes: 0

Views: 1152

Answers (1)

Rubberduck1337106092
Rubberduck1337106092

Reputation: 1344

I figured it out myself.

Edited the Done function of my ajax call to reinitiate the slider.

}).done(function(response){
    $('.slider-wrapper').html(response);
    $('.slider-wrapper .flexslider').flexslider();
});

Upvotes: 1

Related Questions