Dhanil
Dhanil

Reputation: 542

Auto sliding not working after click next slider button

I am using a jquery plugin for testimonial. When i click next slider button it will stop auto sliding. How can i solve that??

here my js code

$('.testimonials-slider').bxSlider({
            slideWidth: 800,
            minSlides: 1,
            maxSlides: 1,
            slideMargin: 32,
            auto: true,
            autoControls: true
          });

here my external js

External Js

Live Demo

Upvotes: 0

Views: 1647

Answers (1)

Bhushan Kawadkar
Bhushan Kawadkar

Reputation: 28513

Try this :

$(document).ready(function () {

        var slider = $('.testimonials-slider').bxSlider({
            slideWidth: 800,
            minSlides: 1,
            maxSlides: 1,
            slideMargin: 32,
            auto: true,
            autoControls: true
          });

   $('.bx-prev, .bx-next').click(function(e){
    slider.stopAuto();
    setTimeout(function(){
           slider.startAuto();
     },300);

    return false;
  });
});

Upvotes: 1

Related Questions