slick-animation icon indicating copy to clipboard operation
slick-animation copied to clipboard

how to stop the animation out when hovering over the slide?

Open ahmedbeheiry opened this issue 8 years ago • 1 comments

I tried your plugin and it's amazing but when I use pauseOnHover: true the slide pauses but the animation doesn't pause or stop.

How can I make it stop when on hover?

Thanks in advance.

ahmedbeheiry avatar Feb 11 '17 15:02 ahmedbeheiry

First of all it's nice to hear that you like my plugin!

This feature is currently not implemented. I think we can achieve this functionality with the css3 property animation-play-state: paused;.

In the current state the plugin does not anything know from slick(); and slick does not know anything from slickAnimation(), therefore wo need to add an option to the slickAnimation plugin. It could look like:

const slider = $('.slider'); 
const pauseOnHover = true;

slider.slick({
    autoplay: true,
    pauseOnHover: pauseOnHover
});

sliderInit.slickAnimation({
    pauseOnHover: pauseOnHover
});

I'm very busy at the moment, and i don't know then i will have some time to digg into it. It would be really cool if you can send a PR for this.

marvinhuebner avatar Feb 13 '17 20:02 marvinhuebner