glide
glide copied to clipboard
Is there built in ways to add slides dynamically?
On page load I init slider with only few images (slides). Then I fetch other images data and want to add it to slider.
I can't just destroy and mount slider again because images can be loaded, for example, in the middle of swiping. So, a user can see some blinking, but I wan't do than invisible for users.
p.s. honestly, I don't understand why it's not easy and why I have to sweat of this simple task. I like Glide, but things like this... I think in our time it's required to support dynamically changes, isn't it?
(Resolved ✅) Hi there...
I found an easy-to-use solution for this issue!
the key to add or remove slides into your glider js is => Before adding or removing slides you must call destroy()
Method then add your new-dynamic slides then you must initialize your Glider again! (worked 100% for me)
See the Screen-Shot below
if your looking for more practical Example please see the below Rep: https://github.com/mdesignfa/add-or-remove-slides-form-Glider.js