Extra divs in slick

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:9
  • Comments:13

github_iconTop GitHub Comments

68reactions
pierre-rcommented, Aug 12, 2019

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
        });
5reactions
arielmoguillanskycommented, Oct 24, 2020

Anyone using @pierre-r solution for React Slick? It crashes when setting rows:0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extra div is added inside .slick-slide in version 1.8.0 - GitHub
Since 1.8.0, an empty and classless div is added inside .slick-slide which is causing slider styles to break. Is this intended and the...
Read more >
Slick slider add new div to the end of each slider with url
I have a page where I display multiple sliders with products from its categories; goal is to add one extra div ...
Read more >
slick - the last carousel you'll ever need - Ken Wheeler
slick is a responsive carousel jQuery plugin that supports multiple breakpoints, CSS3 transitions, touch events/swiping & much more!
Read more >
Need to remove Content Pane divs in skin - DotNetNuke
<div class="slick-list draggable"><div class="slick-track" style="opacity: 1; width: 570px; ... So I don't need extra div when I load this content pane.
Read more >
Slick add & remove function - CodePen
<div class="buttons">. 10. <a href="javascript:void(0)" class="button js-add-slide">Add Slide</a>. 11. <a href="javascript:void(0)" class="button ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found