引导柱内的光滑轮播

时间:2019-05-27 20:40:38

标签: slick slick.js slick-slider

我的目标是要有2列的行,左列是一个光滑的滑块,其中将包含3个幻灯片。在左列内,我有另一行,因为在幻灯片中,我有3 x 3的网格。我似乎无法正确初始化光滑的滑块,这是我的代码:

<!-- services -->
<div class="services-container">
    <div class="main-wrapper">

        <div class="row">

            <?php if(have_rows('services')):
                $i = 0;
            ?>  

            // LEFT HALF
            <div class="col-lg-6">
                <div class="services-slide">
                    <div class="row">
                        <?php while(have_rows('services')): the_row();
                            $i++;
                            $title = get_sub_field('icon_title')
                        ?>
                        <?php if($i == 10){break;} ?>

                        // 3 X 3 GRID OF ITEMS
                        <div class="col-lg-4">
                            <p><?php echo $title; ?></p>
                        </div>

                        <?php endwhile;?>
                    </div>
                </div>
            </div>

            <?php endif; ?>

            // RIGHT HALF
            <div class="col-lg-6">
                <p>right side qsldjsajhdaslkd</p>
            </div>

        </div>

    </div>
</div>
<!-- /services -->


    // services slick gallery
        $('.services-slides').slick({
            infinite: true,
            slidesToShow: 1,
            initialSlide: 0,
            autoplay: true,
            autoplaySpeed: 4500,
            fade: true,
            arrows: false,
            dots: false
        });

0 个答案:

没有答案