Eric
Eric

Reputation: 11

Jquery Galleria: autoplay again after interaction

I'm using Jquery Galleria for my website.

What I want is: autoplay slideshow on load, stop it when I click on thumbnails or navigation, but after idle time the autoplay continue.

With pauseOnInteraction:true , the autoplay will not continue after click. With pauseOnInteraction:false, the autoplay will not stop at all.

How can I do this?

Thanks, Eric

Upvotes: 1

Views: 1923

Answers (1)

David Hellsing
David Hellsing

Reputation: 108500

You can try using the idle_enter event like this:

this.bind('idle_enter', function(e) { 
    this.play();
});

Implementation

If you are using 1.2.4 (released yesterday), you can implement this using Galleria.ready:

Galleria.ready(function() {
    this.bind('idle_enter', function(e) { 
        this.play();
    });
});

Or use the extend option:

$('#galleria').galleria({
    extend: function() {
        this.bind('idle_enter', function(e) { 
            this.play();
        });
    }
});

You can set the time Galleria will wait before entering idle mode using the idleTime option.

Upvotes: 2

Related Questions