M
M
myskypesla2017-10-04 00:42:39
Slick
myskypesla, 2017-10-04 00:42:39

Why does slick js add 2 extra divs?

I install slick js in vue or via npm in an html project, and it doesn't matter which way, via vue-slick or using jquery and slick-caousel.

Set this behavior if I install slick-carousel via NPM. Then 2 or one extra div immediately appears. I don't understand why.

How can the problem be solved?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
Z
zwezew, 2017-10-30
@zwezew

On webpack, a similar problem was solved by connecting a minified file
require('slick-carousel/slick/slick.min.js');

E
Egor Zhivagin, 2017-10-04
@Krasnodar_etc

See the Vue code, slick never adds such blocks.

A
Anton, 2017-10-04
Semenov

Maybe somewhere stupidly unclosed div =)
Search, of course, by the method of exceptions, plus look inside slick, suddenly there is something like usediv = true somewhere to wrap it in an empty div? In general, a lot of options

A
Alexey, 2019-08-07
@alexmirg

If the slider has only 1 row, try adding rows: 0
an Example,

$('.your-slider').slick({
  // your settings
  rows: 0,
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question