jquery-flipster icon indicating copy to clipboard operation
jquery-flipster copied to clipboard

Automation doesnt loop

Open paulcripps opened this issue 7 years ago • 3 comments

We have a slide show with worked fine, original loop was set to 'true', as expected once at the end of the carousel we automatically go back to the start.

If we then set autoplay to a number, say 2000, it automatically plays.

However, it no longer loops at the end of the items.

    $("#flipster").flipster({
        loop: true,
        autoplay: true,
        style: 'cm_flat',
        spacing: -0.36,
        buttons: true,
        scrollwheel: false
    });

Any though how we can achieve an automated loop?

paulcripps avatar Aug 16 '17 09:08 paulcripps

I have the same problem. Found it working here: http://a.drien.com/jquery-flipster/ But I can't find the difference in the code compared to jquery flipster.

waldbach avatar Aug 20 '17 22:08 waldbach

A crude workaround that might work would be to add your own JS to trigger flipster's next function.

Using jQUery as an example:

    function flipsterLoopNext(){
        $("#flipster").flipster('next');
        SlideTimeID = setTimeout(flipsterLoopNext, 3000); // repeat
    }		
    var SlideTimeID = setTimeout(flipsterLoopNext, 3000);

This loops every 3000 milliseconds, triggering the next slide. Not great but appears to work.

paulcripps avatar Aug 21 '17 09:08 paulcripps

Just set autoplay to any integer which is equivalent to number of milleseconds

channox32 avatar Dec 04 '19 19:12 channox32

This repository is going into very-low-maintenance mode and declaring backlog bankruptcy

drien avatar Jan 18 '24 00:01 drien