| @@ -5,23 +5,15 @@ import Slider from "../slider/slider"; | |||||
| class IHKMHSlider { | class IHKMHSlider { | ||||
| constructor(section) { | constructor(section) { | ||||
| this.section = section.addClass('initiated'); | this.section = section.addClass('initiated'); | ||||
| this.slides = section.children(); | |||||
| this.slider = new Slider(section); | this.slider = new Slider(section); | ||||
| this.stringLength = 0; | |||||
| this.settings = { | |||||
| this.slider.settings = { | |||||
| loop: true, | loop: true, | ||||
| autoplay: true, | autoplay: true, | ||||
| infinite: true, | infinite: true, | ||||
| autoplaySpeed: 1000, | |||||
| autoplaySpeed: 7000, | |||||
| animationSpeed: 600, | animationSpeed: 600, | ||||
| startSlide: 1, | startSlide: 1, | ||||
| }; | }; | ||||
| this.slider.section.on('in-viewport slide-change', () => { | |||||
| const curr = this.slider.currentSlide; | |||||
| if (this.slides[curr].hasCounter) { | |||||
| this.startCounter(curr); | |||||
| } | |||||
| }) | |||||
| } | } | ||||
| } | } | ||||