2 Extra div for in slick when used version 1.8.1
When i used slick.js 1.8.1 unminifed file:
https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.js
I got two extra div when i inspect.
<div class="slick-slide slick-current slick-active" data-slick-index="0" aria-hidden="false" style="width: 153px;">
<div>
<div class="step" style="width: 100%; display: inline-block;">
<h3>1</h3>
</div>
</div>
</div>
hear is the js fiddle
https://jsfiddle.net/cz5nds1e/
Now When i use minifed file of the version 1.8.1
https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js
when i inspect there is no extra div
<div class="step slick-slide slick-current slick-active" style="width: 153px;" data-slick-index="0" aria-hidden="false" tabindex="0">
<h3>1</h3>
</div>
hear is the js fiddle
https://jsfiddle.net/offzcn8s/
When i debugged this issue i got to know that in minifed file a function 'buildRows' as
this condition below
l.options.rows > 1
and in unminifed file this condition
_.options.rows > 0
I use 1.8.0, have the same issue.
I see this same issue. And since we are doing some custom positioning of content with flexbox. the extra <div> causes layout issues.
The comment linked by @gserrg is very interresting. A quick (temporary) fix is to add "rows: 0" to the options of your slick slider.
Here is an example of mine :
$('.slick-frontpage').slick({
dots: false,
arrows: false,
slidesToShow: 1,
slidesToScroll: 1,
infinite: true,
rows: 0 // Fix vor v1.8.0-1
});
@gserrg Thanks man for quick fix
works like a charme
You just saved my life
O! Thanks man!
Anyone using @pierre-r solution for React Slick? It crashes when setting rows:0
rows: 0
Great, thank you.
This also solved the white padding issue at the bottom
Most helpful comment
The comment linked by @gserrg is very interresting. A quick (temporary) fix is to add "rows: 0" to the options of your slick slider.
Here is an example of mine :