1/** 2 * @file 3 */ 4 5(function($, Drupal, once) { 6 'use strict'; 7 8 /** 9 * Text with icons component animation. 10 */ 11 Drupal.behaviors.animationIconCard = { 12 attach: function (context) { 13 14 const desktopWidth = 992; 15 const iconCardSelector = $('.coh-column:first-child > .icon-card-with-text', context); 16 17 $(once('icon-cards', iconCardSelector, context)).each(function() { 18 const $iconCardWrapper = $(this).closest('.coh-row-inner'); 19 const $iconCards = $iconCardWrapper.find('.icon-card-with-text'); 20 21 if (window.innerWidth < desktopWidth) { 22 $(window).on('load scroll', function() { 23 $iconCards.each((i, card) => { 24 const scrollPos = $(card).offset().top - $(this).height() + $(card).outerHeight(); 25 26 if ($(this).scrollTop() > scrollPos) { 27 $(card).addClass('active'); 28 } 29 }); 30 }); 31 } 32 else { 33 $(window).on('load scroll', function() { 34 const scrollPos = $iconCardWrapper.offset().top - $iconCardWrapper.outerHeight(); 35 36 if ($(this).scrollTop() > scrollPos) { 37 $iconCards.each((i, card) => { 38 setTimeout(() => { 39 $(card).addClass('active'); 40 }, 100 + i * 400); 41 }); 42 } 43 }); 44 } 45 }); 46 47 } 48 }; 49 50})(jQuery, Drupal, once);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.