S
S
Stepan Bagritsevich2016-11-26 21:49:50
JavaScript
Stepan Bagritsevich, 2016-11-26 21:49:50

Why doesn't carousel work on slick.js?

Blocks disappear. I am using slick.js plugin, please help me.
Here is the code:

HTML:

<div class="pricingTab">
                    <div class="priceTable1">
                        <div class="headerOfTab">Минимальный</div>
                        <div class="hrOfTab"></div>
                        <div class="priceOfTab"> <div class="priceOfTabMini">&#36;</div>120</div>
                        <ul class="textOfTab">
                            <li>10 фотографий</li>
                            <li class="li">Фотографии размером<br>1200х800</li>
                            <li class="li">Съёмка 3-4 образов</li>
                        </ul>
                    </div>
                    <div class="priceTable2">
                        <div class="headerOfTab">Комфортный</div>
                        <div class="hrOfTab"></div>
                        <div class="priceOfTab"> <div class="priceOfTabMini">&#36;</div>170</div>
                        <ul class="textOfTab">
                            <li>20 фотографий</li>
                            <li class="li">Фотографии размером<br>1200х800</li>
                            <li class="li">Съёмка 4-5 образов</li>
                        </ul>
                    </div>
                    <div class="priceTable3">
                        <div class="headerOfTab">Стандарт</div>
                        <div class="hrOfTab"></div>
                        <div class="priceOfTab"> <div class="priceOfTabMini">&#36;</div>350</div>
                        <ul class="textOfTab">
                            <li>30 фотографий</li>
                            <li class="li">Фотокнига размеров<br>20х20 на 10 разворотов</li>
                            <li class="li">Фотографии размером<br>1200х800</li>
                            <li class="li">Съёмка 6-10 образов</li>
                        </ul>
                    </div>
                </div>


CSS:
.pricingTab {
    width: 1024px;
    height: 450px;
    transform: translateX(-50%);
    position: absolute;
    top: 253px;
    left: 50%;
}
.priceTable1 {
    width: 320px;
    height: 450px;
    background-color: #252c33;
    position: absolute;
    top: 0;
    left: 0;
}
.priceTable2 {
    width: 320px;
    height: 450px;
    background-color: #252c33;
    position: absolute;
    top: 0;
    left: 350px;
}
.priceTable3 {
    width: 320px;
    height: 450px;
    background-color: #252c33;
    position: absolute;
    top: 0;
    right: 0;
}
.headerOfTab {
    margin: 0;
    position: absolute;
    top: 33px;
    left: 40px;
}
.hrOfTab {
    height: 3px;
    width: 240px;
    background-color: #fff;
    position: absolute;
    top: 77px;
    left: 40px;
}
.priceOfTab {
    position: absolute;
    top: 105px;
    left: 50.88px;
}
.priceOfTabMini {
    position: absolute;
    top: 0;
    left: -10.88px;
}
.textOfTab {
    width: 280px;
    margin: 0;
    padding: 0;
    text-align: right;
    list-style-type: none;
    position: absolute;
    top: 165px;
    right: 40px;
}
.textOfTab .li {
    margin-top: 4px;
}


JQEURY:
$('.pricingTab').slick({
                arrows: true,
                slidesToShow: 3,
                slidesToScroll: 1
            });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iBird Rose, 2016-11-26
@iiiBird

slick has nothing to do with it. it works fine. he broke it with his own styles through position: absolute; and transform: translateX();
without styles works fine: https://jsfiddle.net/oaz9hczh/1/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question