After pausing, unslider autoplays when swiping. #419

F-Tahir opened this Issue Jul 18, 2016 · 0 comments


None yet

1 participant

F-Tahir commented Jul 18, 2016 edited


I've enabled swipe on Unslider with the following lines:

    <script src=""></script>
    <script src=""></script>

I've written some jquery such that when I hit a pause button, unslider.stop() method is called and the slides stop autoplaying. However when swiping while paused, the autoplay starts up again. is there anyway I can fix this behaviour? My code is as follows:

        jQuery(document).ready(function($) {
                infinite: true,
                autoplay: true,
                arrows: false,
                delay: 4500,
                speed: 500,
                nav: true,

            /* Function to start/stop image slider */
            $('#slider-content i').click(function() {
                if ( $('#slider-content>i').hasClass("fa-pause-circle") ) {
                    $('#slider-content>i').toggleClass('fa-pause-circle fa-play-circle');
                } else {
                    $('#slider-content>i').toggleClass('fa-pause-circle fa-play-circle');


Any help is appreciated. Also on a sidenote, is there any way to stop the slides re-initializing (i.e. not having to wait the full delay) when paused and played again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment