Просмотр исходного кода

WIP Slider autoplay

bugfix/marketinghero
Lukas Zimmer 2 лет назад
Родитель
Сommit
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.slider = new Slider(section);
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', () => {
const curr = this.slider.currentSlide;
if (this.slides[curr].hasCounter) {


Загрузка…
Отмена
Сохранить