S
S
Sergey2019-09-19 22:42:35
JavaScript
Sergey, 2019-09-19 22:42:35

The attribute for SlickSlider is not written via HTML. What syntax should be used in this case?

In the SlickSlider plugin, you can specify settings using the data-slick attribute of the root element of the slider. Initially, everything was written in jQuery in a separate file and worked properly. I ported 5 settings to HTML and they work too. But the sixth parameter has a slightly different form. I tried to google and it seems that no one asked such a stupid question except me.

This is what this parameter looks like in the js file: It is distinguished by the fact that it is, firstly, an HTML code, and secondly, it has quotes.
prevArrow: '<a href="#" class="slick-prev"></a>'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-09-19
@Hurricane202

The quotes must be escaped. For example .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question