Best way to remove all slides and add one new
MartijnHarmenzon opened this issue · 2 comments
MartijnHarmenzon commented
What is the best way to remove all slides and add one new?
I tried the following code, but this does not remove all slides.
for (let i = 0; i < glider.slides.length; i++) { glider.removeItem(glider.slides.length - 1); };
MartijnHarmenzon commented
Solved. I forgot to make a const of the glider.slides.length.
NickPiscitelli commented
That code appears to have a bug in it. It should just call removeItem(i), but I didn't test it.You should also just be able to empty the container and call refresh()---- On Mon, 14 Mar 2022 11:16:05 -0400 Martijn ***@***.***> wrote ----
What is the best way to remove all slides and add one new?
I tried the following code, but this does not remove all slides.
for (let i = 0; i < glider.slides.length; i++) { glider.removeItem(glider.slides.length - 1); };
—Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>