javascript slick_carousel_image_out_block.js
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript slick_carousel_image_out_block.js相关的知识,希望对你有一定的参考价值。
function slickSlider() {
// Involve Slider
$('.slick-for').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
// fade: true,
asNavFor: '.slick-nav',
speed: 700,
infinite: false,
});
$('.slick-nav').slick({
infinite: false,
speed: 0,
slidesToShow: 1,
slidesToScroll: 1,
asNavFor: '.slick-for',
swipe: false,
});
// Slide Count
let slickSlider = $(".slick-nav"),
slickSliderCount = $(".slick-count"),
slickSliderCountSpan = $(".slick-count span"),
slickSlideTotal = $('.slick-item').length / 2; // if have slider-nav and slider-for
// slickSlideTotal = $('.slick-item').length;
slickSliderCountSpan.text(slickSlideTotal);
slickSlider.on("init", function(event, slick){
slickSliderCount.text(parseInt(slick.currentSlide + 1) + ' / ' + slick.slideCount);
});
slickSlider.on("afterChange", function(event, slick, currentSlide){
slickSliderCount.text(parseInt(slick.currentSlide + 1) + ' / ' + slick.slideCount);
});
} slickSlider();
以上是关于javascript slick_carousel_image_out_block.js的主要内容,如果未能解决你的问题,请参考以下文章
javascript JavaScript isset()等效: - JavaScript
JavaScript 使用JavaScript更改CSS(JavaScript)
JavaScript之基础-1 JavaScript(概述基础语法)
前端基础-JavaScript的基本概述和语法
JavaScript
JavaScript