import $ from 'jquery'; import 'jquery.easing'; import Slider from "../slider/slider"; class CardSlider { constructor(section) { this.section = section.addClass('initiated'); this.slides = section.children(); this. cardLength = section.find('.card-slider-container .card').length; if (this.cardLength >= 3) { this.slider = new Slider(section.find('.card-slider-container')); this.stringLength = 0; } } } export default CardSlider; $('body').on('ihk-init dynamic-component-loaded gfi-dynamic-init', function () { $('.card-slider:not(.initiated)').each(function() { new CardSlider($(this)); }); });