1const autoPlayElement = document.querySelector('.slick-editable-slider'); 2const element = autoPlayElement?.dataset.autoplay; 3const flag = (element === 'true'); 4jQuery('.slick-editable-slider .slider-list').on('init', function (event, slick, direction) { 5 // check to see if there are one or less slides 6 if (!(jQuery('.slider .slick-slide').length > 1)) { 7 jQuery('.slider-list').css('display', 'unset'); 8 jQuery('.slider .slick-slide').removeClass('slick-active'); 9 // remove arrows 10 jQuery('.slider-nav').hide(); 11 jQuery('.slick-dots').hide(); 12 } 13}); 14 15const navClass = jQuery(autoPlayElement).hasClass('defaultNav'); 16console.log(navClass); 17 18if (navClass === true) { 19 jQuery('.slick-editable-slider .slider-list').slick({ 20 dots: true, 21 arrows: true, 22 prevArrow: '<button class="sogeti-arrow slide-arrow prev-arrow"></button>', 23 nextArrow: '<button class="sogeti-arrow slide-arrow next-arrow"></button>', 24 infinite: false, 25 slidesToShow: 1, 26 slidesToScroll: 1, 27 autoplay: flag, 28 pauseOnHover: true, 29 speed: 700, 30 autoplaySpeed: 2000, 31 responsive: [{ 32 breakpoint: 500 33 }] 34 }); 35} else { 36 jQuery('.slick-editable-slider .slider-list').slick({ 37 dots: true, 38 arrows: false, 39 infinite: false, 40 slidesToShow: 1, 41 slidesToScroll: 1, 42 appendArrows: '.slider-nav', 43 appendDots: '.slider-nav', 44 autoplay: flag, 45 pauseOnHover: true, 46 speed: 700, 47 autoplaySpeed: 2000, 48 responsive: [{ 49 breakpoint: 500 50 }] 51 }); 52} 53 54jQuery('.slick-editable-slider .slick-prev').click(function () { 55 jQuery('.slider-list').slick('slickPrev'); 56}); 57 58// Bind event handler for the next arrow button 59jQuery('.slick-editable-slider .slick-next').click(function () { 60 jQuery('.slider-list').slick('slickNext'); 61}); 62 63if (jQuery('.sogeti-arrow').length) { 64 // Add the 'test' class to the parent section element 65 jQuery('.sogeti-arrow').closest('section').addClass('withNav'); 66} 67 68jQuery('.sogeti-button.without-border').parent().css('padding-top', '0px'); 69 70function adjustCardHeights () { 71 jQuery('.slick-editable-slider .slider-list').each(function () { 72 let maxHeight = 0; 73 const cardsInRow = jQuery(this).find('.bgImagesection'); 74 cardsInRow.css('height', 'auto'); 75 76 cardsInRow.each(function () { 77 const cardHeight = jQuery(this).outerHeight(); 78 if (cardHeight > maxHeight) { 79 maxHeight = cardHeight + 86; 80 } 81 }); 82 83 cardsInRow.css('height', maxHeight); 84 }); 85} 86adjustCardHeights(); 87jQuery(window).resize(function () { 88 adjustCardHeights(); 89});
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.