Extra divs in slick
See original GitHub issue2 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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:13
Top GitHub Comments
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 :
Anyone using @pierre-r solution for React Slick? It crashes when setting rows:0