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();
});
}
});
精彩评论