views:

193

answers:

2

Hi.

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

A: 

without knowing the specifications of that plugin, I'm pretty sure there are functions for stopping as well as for starting it. You should trigger those with a hover:

$('#scrolling_div').hover(function(){
   $(this).stop();
}, function(){
   $(this).start();
});
jAndy
A: 

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