kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.54k stars 5.89k forks source link

slick pauseonhover issue #3587

Open samuEl-FS opened 6 years ago

samuEl-FS commented 6 years ago

https://codepen.io/Sam8286/pen/pxJROz

this is my demo page

I am having an issuse pauseohhover takes exactly the value of speed which is 8 sec in my case can any one suggest me an answer also i have used a pause and resume button the pause take 8sec but the resume happens immediatly

kenwheeler can you help me with this....

andrewcourtney commented 6 years ago

Hi there,

Just want to chip in and say I was also experiencing this issue but the following settings helped: autoplay: true, autoplaySpeed:3000, cssEase: 'linear',

You might still want to adjust the animation speed using the "speed" setting - I've got mine set to 1000 and that seems to have settled it down enough for the user to still take in the information as it automatically scrolls.

I think the main issue is because pauseOnHover is set to true by default so adding it in causes a conflict somehow?

The demo you provided doesn't appear to be working for me for some reason though so I can't update it and check for certain...Hope my settings helped to resolve your issue anyway.

samuEl-FS commented 6 years ago

Autoplay speed will start the auto scroll after the specificed time

On Mon 1 Oct, 2018, 5:01 PM andrewcourtney, notifications@github.com wrote:

Hi there,

Just want to chip in and say I was also experiencing this issue but the following settings helped: autoplay: true, autoplaySpeed:3000, cssEase: 'linear',

You might still want to adjust the animation speed using the "speed" setting - I've got mine set to 1000 and that seems to have settled it down enough for the user to still take in the information as it automatically scrolls.

I think the main issue is because pauseOnHover is set to true by default so adding it in causes a conflict somehow?

The demo you provided doesn't appear to be working for me for some reason though so I can't update it and check for certain...Hope my settings helped to resolve your issue anyway.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kenwheeler/slick/issues/3587#issuecomment-425874959, or mute the thread https://github.com/notifications/unsubscribe-auth/AgfdarI98WHzqLmoz_xVjIFqNOmT23xvks5ugfz4gaJpZM4XBb8v .

samuEl-FS commented 6 years ago

Hi there,

Just want to chip in and say I was also experiencing this issue but the following settings helped: autoplay: true, autoplaySpeed:3000, cssEase: 'linear',

You might still want to adjust the animation speed using the "speed" setting - I've got mine set to 1000 and that seems to have settled it down enough for the user to still take in the information as it automatically scrolls.

I think the main issue is because pauseOnHover is set to true by default so adding it in causes a conflict somehow?

The demo you provided doesn't appear to be working for me for some reason though so I can't update it and check for certain...Hope my settings helped to resolve your issue anyway.

still not working the slick pause when then the card is completed i have update the link of my codepen can you review it let me now

srikat commented 5 years ago

Have the same issue.

$(".logo-carousel").slick({
    speed: 10000,
    autoplay: true,
    autoplaySpeed: 0,
    cssEase: 'linear',
    variableWidth: true,
    arrows: false
});

When we hover, the movement stops after 10s, not immediately.

rifflock commented 2 years ago

I found a solution which is not ideal, but it works:

// var normalSpeed = 2000;
// var quickSpeed = 500;
$slider.on('mouseenter', () => {
  var track = $('.slick-track')[0];
  // ORIGINAL cssText "opacity: 1; width: 30000px; transform: translate3d(-1400px, 0px, 0px); transition: transform 2000ms linear 0s;"
  track.style.cssText = "opacity: 1; width: 30000px; transform: translate3d(-1400px, 0px, 0px); transition: transform 500ms linear 0s;"
  $slider.slick('slickSetOption', 'speed', quickSpeed, true).slick('slickPause');
}).on('mouseleave', () => {
  $slider.slick(slickSetOption', 'speed', normalSpeed, true).slick('slickPlay');
});

Manually setting the transform value to my quick speed got it to zip to the end of the transform. Setting transform and transition to undefined stops it where it is.

Definitely a hack, and changing the value of transform/transition instead of cssText did not work.