Slick: Slider set to display:none then set to show() ... first slide does not show??

Created on 29 Mar 2017  路  1Comment  路  Source: kenwheeler/slick

I have read similar threads on here that have the issue of the first slide not displaying. I have tried to implement them into my example, but not appear to work.

I show the slider by clicking the trigger button.

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

https://jsfiddle.net/ndzf7gx6/1/

Most helpful comment

There're a bunch of issues that address this. Basically slick can calc the dimensions if the slides aren't taking up space in the dom. Use visibility: hidden w/ position: absolute to take it out of the document flow, instead of display: none or use the slick reset/setPosition method in your JS when the click event reveals it.

>All comments

There're a bunch of issues that address this. Basically slick can calc the dimensions if the slides aren't taking up space in the dom. Use visibility: hidden w/ position: absolute to take it out of the document flow, instead of display: none or use the slick reset/setPosition method in your JS when the click event reveals it.

Was this page helpful?
0 / 5 - 0 ratings