开发者

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


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();
        });
    }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜