浏览代码

WIP Slider autoplay

bugfix/marketinghero
Lukas Zimmer 2 年前
父节点
当前提交
05be956794
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. +8
    -1
      gfi-ihk-2024/stories/sections/marketingheader/marketingheaderslider.js

+ 8
- 1
gfi-ihk-2024/stories/sections/marketingheader/marketingheaderslider.js 查看文件

@@ -8,7 +8,14 @@ class IHKMHSlider {
this.slides = section.children(); this.slides = section.children();
this.slider = new Slider(section); this.slider = new Slider(section);
this.stringLength = 0; this.stringLength = 0;

this.settings = {
loop: true,
autoplay: true,
infinite: true,
autoplaySpeed: 1000,
animationSpeed: 600,
startSlide: 1,
};
this.slider.section.on('in-viewport slide-change', () => { this.slider.section.on('in-viewport slide-change', () => {
const curr = this.slider.currentSlide; const curr = this.slider.currentSlide;
if (this.slides[curr].hasCounter) { if (this.slides[curr].hasCounter) {


正在加载...
取消
保存