Can't destroy slick - unslick function returns error
See original GitHub issueI’m unable to destroy a slick instance. Calling $('.your-slider').unslick();
returns Uncaught TypeError: Cannot read property 'parent' of null
on line 575 of slick.js. It would appear $slides
is undefined. Is anyone else seeing this issue?
Issue Analytics
- State:
- Created 9 years ago
- Comments:59 (6 by maintainers)
Top Results From Across the Web
SlickJS, unslick() remove issue - jquery - Stack Overflow
Try this: $('.your-slider').slick('unslick');.
Read more >slick - the last carousel you'll ever need - Ken Wheeler
Hi there. I'm using slick in my vue js project. Having some troubles. When slick is cloning elements can't clone event listeners. How...
Read more >kenwheeler/slick - Gitter
First one is, I'm using slick as a carousel for a list of card-style displays, which have an onclick event to add an...
Read more >https://www.aamu.edu/_resources/ldp/galleries/slic...
Add the slick-theme.css if you want default styling --> <link rel="stylesheet" ... settings: "unslick" // destroys slick }] }); ``` ### Events In...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not sure if anyone is still looking at this but I was stuck on it for an hour. I realised I have either read the way you call methods wrong or it’s changed.
Instead of
carousel.unslick();
you should usecarousel.slick("unslick");
In my case I needed to destroy slick at a certain window size. This worked for me: