slick: Slick is never reenabled after "unslicked" at breakpoint
I use settings: 'unslick'
to disable Slick at certain breakpoints. But as soon as Slick is disabled (either by resizing or at page load), it will never be reenabled when resizing. Example:
$('.my-class').slick({
mobileFirst: true,
slidesToShow: 2,
slidesToScroll: 2,
responsive: [ {
breakpoint: 768,
settings: 'unslick'
} ]
});
Loading the page with a viewport narrower than 768px enables Slick, resizing beyond 768px disables Slick, but resizing back below 768px keeps Slick disabled.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 1
- Comments: 21 (1 by maintainers)
+1
The way I solved both issues is with these couple of extra lines of code:
EDIT: The above could probably be shortened to:
+1.
And docs should mention this issue and should not feature unslick on the responsive part, since it simply doesn’t work as expected, as really a lot of threads and developers are reporting. So much threads definitely make this one an issue and a bug.
Comment on what @vfonic posted. For me the solution was this:
I’m using version 1.8.1
+1 This should be a bug, and officially fixed.