|
- import $ from 'jquery';
- import 'jquery.easing';
- import Slider from "../slider/slider";
-
- class IHKETLSlider {
- constructor(section) {
- this.section = section.addClass('initiated');
- this.slides = section.children();
- this.slider = new Slider(section.find('.eventteaserlargeslider'));
- this.stringLength = 0;
-
- this.slider.section.on('in-viewport slide-change', () => {
- const curr = this.slider.currentSlide;
- if (this.slides[curr].hasCounter) {
- this.startCounter(curr);
- }
- })
- }
- }
-
- export default IHKETLSlider;
-
- $('body').on('ihk-init dynamic-component-loaded gfi-dynamic-init', function () {
- $('.rotationslider:not(.initiated)').each(function() {
- new IHKETLSlider($(this));
- });
- });
-
|