https://cdn.adiglobaldistribution.us/userfile-na/US/userfiles/land…/js/resourcesSlider.js?v=20250702
1$(document).ready(function () { 2 // Load the Slick script dynamically 3 $.getScript("https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js", function () { 4 setTimeout(function () { 5 // Initialize Slick slider 6 $('.slider-holder').slick({ 7 arrows: false, 8 centerPadding: "0px", 9 dots: true, 10 slidesToShow: 3, 11 slidesToScroll: 3, 12 infinite: false, 13 mobileFirst: false, 14 responsive: [ 15 { 16 breakpoint: 1100, 17 settings: { 18 slidesToShow: 2, 19 slidesToScroll: 2 20 } 21 }, 22 { 23 breakpoint: 710, 24 settings: { 25 slidesToShow: 1, 26 slidesToScroll: 1 27 } 28 } 29 ] 30 }); 31 32 // Handle initial resize and attach resize event handler 33 handleResize(); 34 $(window).resize(handleResize); 35 36 // Function to toggle visibility of dots based on number of cards and window width 37 function toggleDots() { 38 const totalCards = $('.slider-holder .card-p').length; 39 const windowWidth = $(window).width(); 40 $('.slick-dots').toggle(totalCards > 3 || windowWidth <= 1100); 41 } 42 43 // Function to set the maximum height for a group of elements 44 function setMaxHeight(elements) { 45 var maxHeight = 0; 46 $(elements).css('height', 'auto'); // Corrected variable name 47 $(elements).each(function () { 48 if ($(this).height() > maxHeight) { 49 maxHeight = $(this).height(); 50 } 51 }); 52 $(elements).height(maxHeight); 53 } 54 55 // Function to handle resizing: set max heights and toggle dots 56 function handleResize() { 57 setMaxHeight($('.slider-holder .card-p .text h5')); 58 setMaxHeight($('.slider-holder .card-p .text p')); 59 toggleDots(); 60 } 61 }, 0); // Add "1500" before executing the code if needed 62 }); 63});
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.