Slick: Missing a .removeAll() method

Created on 18 Oct 2014  Â·  13Comments  Â·  Source: kenwheeler/slick

I need to remove all slides from my initialized Slick slideshow and I found that the method .slickRemove() can only remove one slide.
I'm using your plugin to power a "modal slideshow" and I want to replace all the slides without re-initializing Slick everytime.

Feature Request

Most helpful comment

it would be great to have this documented on the website.

$('.slick-container').slick('removeSlide', null, null, true);

All 13 comments

Thanks man! Nice work :)

On Sat, Nov 8, 2014, 15:18 Ken Wheeler [email protected] wrote:

Closed #673 https://github.com/kenwheeler/slick/issues/673 via 07d1eb3
https://github.com/kenwheeler/slick/commit/07d1eb396487a0fdf812864456f52d638f8c21a7
.

—
Reply to this email directly or view it on GitHub
https://github.com/kenwheeler/slick/issues/673#event-190327153.

No prob brotha

it would be great to have this documented on the website.

$('.slick-container').slick('removeSlide', null, null, true);

+1000000 points for @chipco - that worked flawlessly. Thanks!

I second chipco's suggestion concerning documentation.

Thank a lot..

I wonder if anyone could help, I'm trying to remove slides with a set class name when new slide was added.

thanks.

@JeffMatthews2 agreed! @chipco this saved me in trying to achieve the same functionality as @iSimonWeb. Developing a single page application that doesn't reload the page, so instead of reinitializing slick with every new data set a removeAll fix worked flawlessly.

@chipco Thank you! Was exactly what I was looking for... I further add my vote to get the documentation updated on this awesome script...

It would be really nice if the was added to the documentation :)

Seems that they changed the name from 'removeSlide' to 'slickRemove'.

$('.slick-slider').slick('slickRemove', null, null, true);

@chipco solution is great for when simply unslicking won't work. I had an issue that my slick differentiate between Firefox and Chrome, so I had to removeSlide and unslick for full support.

Works like a charm!

$('.slick-slider').slick('slickRemove', null, null, true);

Was this page helpful?
0 / 5 - 0 ratings