Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hoverpause doesn't instantly pause the carousel #697

Open
Harv3yRig opened this issue Aug 8, 2024 · 0 comments
Open

Hoverpause doesn't instantly pause the carousel #697

Harv3yRig opened this issue Aug 8, 2024 · 0 comments

Comments

@Harv3yRig
Copy link

Harv3yRig commented Aug 8, 2024

I have made an infinite carousel for a project I am working on, however I have noticed that the hoverpause feature does not fully work the way I want it to. My hope was to allow the user to instantly pause the carousel when hovering over an image, however because I have given the carousel an animation duration, the carousel will carry out the full animation before pausing. Is this supposed to be the case or is there a workaround somebody knows? Below is my code + html layout of my carousel.

const glide = new Glide(sliderElement, { type: 'carousel', perView: 4, autoplay: true, bound: true, hoverpause: true, animationDuration: 4000, animationTimingFunc: 'linear', breakpoints: { 1440: { perView: 4 }, 1024: { perView: 3 }, 768: { perView: 2 }, 425: { perView: 2, gap: 75 }, 320: { perView: 2, gap: 100 } } }); glide.mount(); }); }

<div class="glide">
                        <div class="glide__track" data-glide-el="track">
                            <ul class="glide__slides">
                                    <li class="glide__slide">
                                        <img class="partnerLogo" _src="link to image"_ />
                                    </li>
                            </ul>
                        </div>
                    </div>
@Harv3yRig Harv3yRig reopened this Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant