Vayu Robins
Vayu Robins

Reputation: 31

Jquery Galleria pause and play on hover

I have implemented the jquery Galleria plugin in a website, but would like for it to pause when I hover my mouse over it and play again, when I remove the mouse.

How can I do this?

Thanks Vayu

Upvotes: 1

Views: 2752

Answers (1)

David Hellsing
David Hellsing

Reputation: 108500

You can use the extend function to do that, like this:

$('.images').galleria({
    autoplay: true,
    extend: function() {
        var gallery = this;
        this.$('stage').hover(function() {
            gallery.pause();
        }, function() {
            gallery.play();
        });
    }
});

Upvotes: 3

Related Questions