You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
688 B

  1. import $ from 'jquery';
  2. import 'jquery.easing';
  3. import Slider from "../slider/slider";
  4. class CardSlider {
  5. constructor(section) {
  6. this.section = section.addClass('initiated');
  7. this.slides = section.children();
  8. this. cardLength = section.find('.card-slider-container .card').length;
  9. if (this.cardLength >= 3) {
  10. this.slider = new Slider(section.find('.card-slider-container'));
  11. this.stringLength = 0;
  12. }
  13. }
  14. }
  15. export default CardSlider;
  16. $('body').on('ihk-init dynamic-component-loaded gfi-dynamic-init', function () {
  17. $('.card-slider:not(.initiated)').each(function() {
  18. new CardSlider($(this));
  19. });
  20. });