Slick: Using dots in responsive mobile first mode with unslick prevents unslick from working

Created on 2 Sep 2017  路  2Comments  路  Source: kenwheeler/slick

short description of the bug / issue, provide more detail below.

I am using unslick for mobile only, and for desktop I am using unslick. By setting the correct breakpoint, this functions correctly. However, when I add dots: true, unslick no longer functions and instead slick is called, even on desktop.

====================================================================

https://jsfiddle.net/utb169xe/

====================================================================

Steps to reproduce the problem

  1. run code above - observe this functions on mobile (slick), and on desktop (unslick) - you might need to refresh to see the difference between the two.
  2. now add dots: true - dots will show, but on desktop unslick will not function, and instead slick will be called

====================================================================

What is the expected behaviour?

Unslick should remain on the breakpoint, whether dots is true or false.

====================================================================

What is observed behaviour?

Slick ignores breakpoints for "unslick" when dots is true

====================================================================

Confirmed

Most helpful comment

I'm not sure if I'm facing the same issue, but with responsive settings, slick doesn't get re-attached after it has beeen "unslicked".

$(wrapper).once('hologic-responsive-grid').slick({ mobileFirst: true, // dots: true, slidesToShow: 1, slidesToScroll: 1, slide: children, responsive: [ { breakpoint: 768, settings: "unslick" // settings: { // slidesToShow: 2, // slidesToScroll: 1 // } } ] });

This is what I wrote for the config, but once I reach the unslick breakpoint, even if I resize the window, slick doesn't get re-attached.

All 2 comments

Good issue. Need to improve the unslick method. PRs welcome if you're feelin ambitious.

I'm not sure if I'm facing the same issue, but with responsive settings, slick doesn't get re-attached after it has beeen "unslicked".

$(wrapper).once('hologic-responsive-grid').slick({ mobileFirst: true, // dots: true, slidesToShow: 1, slidesToScroll: 1, slide: children, responsive: [ { breakpoint: 768, settings: "unslick" // settings: { // slidesToShow: 2, // slidesToScroll: 1 // } } ] });

This is what I wrote for the config, but once I reach the unslick breakpoint, even if I resize the window, slick doesn't get re-attached.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

k-lusine picture k-lusine  路  3Comments

crstauf picture crstauf  路  3Comments

Libig picture Libig  路  3Comments

ericestes picture ericestes  路  3Comments

rahi-rajeev picture rahi-rajeev  路  3Comments