Open rhysstubbs opened 4 years ago
Had the same problem here @rhysstubbs,
Inputing values in vw instead of the % on the _.glideslides and .glideslide_ classes in the glide.core.css worked for me.
Had the same problem and initializing Glide after window load event worked for me:
window.addEventListener('load', function () {
new Glide('.glide', {
startAt: 0,
perView: 4
}).mount();
}); ```
Can confirm that the code @novelja provided fixed the issues for me.
i noted this here... https://github.com/glidejs/glide/issues/508#issuecomment-687353604
the issue is that glidejs doesn't look at css properties, styles or anything, it looks at the rendered dimensions of the elements. so calling it while the page is still painting will fuck it up - and this includes dynamic elements that have css transitions/animations, you need to wait for the element to be done whatever it is that its doing before you mount().
Had the same problem and initializing Glide after window load event worked for me:
window.addEventListener('load', function () { new Glide('.glide', { startAt: 0, perView: 4 }).mount(); }); ```
and me i can confirm this but now responsive slider not work:
perViewLg:2, perViewSm:1
If you have this issue after adding the window load event listener, what finally fixed it for me was calling the .update() method right after mounting it. That fixed the resize issue for me.
When I mount the slider the initial width of all the slides is incorrect, thus, making all slides incorrectly positioned when navigating forward/backwards.
The issue is resolved after a window resize event but the initial width is continuously incorrected. Because it fixes itself on resize I am ruling out my CSS is causing the issue.
I am using the following HTML markup:
With the following CSS (SCSS):