Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoplay stops on interaction #75

Open
sarkaramitabh300 opened this issue Mar 21, 2018 · 1 comment
Open

Autoplay stops on interaction #75

sarkaramitabh300 opened this issue Mar 21, 2018 · 1 comment

Comments

@sarkaramitabh300
Copy link

Autoplay stops on interaction and have to refresh page in order to restart autoplay,
I have tried to use disableOnInteraction:'false'but it's not working.

@sperro
Copy link

sperro commented Jun 6, 2018

Check which version of swiper.js you have installed. I think this was fixed in the latest version. Another work around is to trigger startAutoplay() after a transition like this

HTML

<ks-swiper-container swiper="swiper" on-ready="onReadySwiper(swiper)">
...
</ks-swiper-container>

JS

 $scope.onReadySwiper = function (swiper) {
        swiper.on('onTransitionStart', function () {
           var mySwiper = $('.swiper-container')[0].swiper;
           mySwiper.startAutoplay(); //restart autoplay
        });
    };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants