Update docs or change responsive:'unslick'
See original GitHub issueI wish I had noticed #994 earlier because the way responsive:unslick works now isn’t very clear from the documentation: “Set settings to “unslick” instead of an object to disable slick at a given breakpoint.”
To me that sounds like it’ll be disabled at that breakpoint, not that slick will be completely removed and not come back at any other breakpoints. I want Slick on bigger screens, but that doesn’t mean I want things to break if the user flips the device or resizes the browser back and forth. I would guess that this is what #542 actually meant?
So now it means I have to write some resize-event-logic to bring Slick back, which would be duplicating what Slick does to disappear.
Some suggestions:
- Update the docs to make the current behaviour clearer.
- Implement the current functionality as some
widthTreshold
setting instead, because theresponsive
object has been states Slick would flip through depending on screen/other width butunslick
breaks that logic. - Change it so that we can have a
disabled
state instead, where Slick continues to flip through theresponsive
states whenever screen/other width changes.
Issue Analytics
- State:
- Created 9 years ago
- Comments:17 (2 by maintainers)
Top Results From Across the Web
Developers - Update docs or change responsive:'unslick' -
Update the docs to make the current behaviour clearer. Implement the current functionality as some widthTreshold setting instead, because the responsive object ...
Read more >Is it possible to unslick/hide a Slick slider for desktops but slick ...
Much cleaner solution than the currently accepted answer: Add the mobileFirst: true, option: $('.slider').slick({ slidesToShow: 5, ...
Read more >how to resize slick and unslick - CodePen
Resize the browser to see it working. An example showing how to start and stop slick responsible, like the "unslick" property but re-slicking...
Read more >responsive slick (Example) | Treehouse Community
In the slick documentation it mentions a new feature that at a given break point you can disable slick: // You can unslick...
Read more >Disabling the slider based on viewport size - WordPress.org
Thank you for your update… I do not understand why you want to hide slider in mobile version. If its not responsive in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
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
I similar issues as @Dechowmedia
I want to ‘unslick’ for smaller devices and switch it back on if the screen is larger. So tablet portrait = no slick, tablet landscape = slick on…
A rough working example is below:
So for screens below 800 we turn slick off, greater is should be on.
This works when I scale the browser down or switch a tablet to portrait but when we scale up or change tablet to landscape slick does not kick back in… unless I re-load the page?
Hey @seriema, I’m on the same page. I was wondering if you’ve got a decent solution to this problem working. I’ve got something working right now, but it seems like it could be simpler:
If you’ve got a better solution working I’d love to see it! 😃