Reputation: 31
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
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