V
V
vvk9962015-11-21 15:43:43
JavaScript
vvk996, 2015-11-21 15:43:43

How to add items to carousel with only certain class?

I use this plugin kenwheeler.github.io/slick

<div class="your-class">
  <div>your content</div>
  <div>your content</div>
  <div>your content</div>
<script>содержимое скрипта</script>
</div>


Blocks that are in the class your-class become elements of the carousel, but there is a script there and it also becomes an element of the carousel, and because of this, the carousel collapses, how to make sure that only the elements are used and the script is ignored?
I can’t remove the script from that place (

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Zuev, 2015-11-21
@vvk996

Try like this

$('.your-class').slick({
  slide: 'div'
});

Examples

I
Inwork277, 2015-11-21
@Inwork277

If you didn’t find anything in the documentation, then try with pens somewhere here
File on github
line 542
Well, or if you need with a class, then
ps: not the fact that it will work;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question