1$(document).ready(function () { 2 if (typeof $.fn.slick !== "undefined") { 3 let slickInitialized = false; 4 function initializeSlick() { 5 if ($(window).width() <= 767) { 6 if (!slickInitialized) { 7 $(".main-news, .summarized-news").slick({ 8 slidesToShow: 1, 9 slidesToScroll: 1, 10 autoplay: false, 11 dots: true, 12 }); 13 slickInitialized = true; 14 } 15 } else if ($(window).width() >= 990) { 16 //DESKTOP 17 $(".main-panels-mobile-tab").show(); 18 $(".side-panels-mobile-tab").show(); 19 if (slickInitialized) { 20 $(".main-news, .summarized-news").slick("unslick"); 21 slickInitialized = false; 22 } 23 } 24 } 25 26 // Initial call to setup slick sliders 27 initializeSlick(); 28 29 // Reinitialize slick on window resize 30 $(window).on("resize", function () { 31 initializeSlick(); 32 }); 33 } 34 35 $(".mobile-tabs span").click(function () { 36 $(".mobile-tabs span").removeClass("active"); 37 $(this).addClass("active"); 38 39 const mobileTabTitle = $(this).data("title"); 40 41 $(".main-panels-mobile-tab").hide(); 42 $(".side-panels-mobile-tab").hide(); 43 $("." + mobileTabTitle + "-panels-mobile-tab").show(); 44 }); 45 46 $(".tabs .tabs-titles li").click(function () { 47 const tabTitle = $(this).data("title"); 48 49 // Switch Title Active 50 $(this).parent().find("li").removeClass("active"); 51 $(this).addClass("active"); 52 53 // Switch Content Active 54 const $tabsContent = $(this).closest(".tabs").find(".tabs-content"); 55 $tabsContent.children().each(function () { 56 if ($(this).data("title") === tabTitle) { 57 $(this).show().addClass("active"); 58 } else { 59 $(this).hide().removeClass("active"); 60 } 61 }); 62 }); 63}); 64 65// Tickers 66$(document).ready(function () { 67 let tickerSpeed = 50; 68 let pauseOnHover = true; 69 70 function moveTicker() { 71 let firstItem = $(".ticker-item").first(); 72 let firstItemWidth = firstItem.outerWidth(true); 73 74 firstItem.animate( 75 { 76 marginLeft: -firstItemWidth, 77 }, 78 (firstItemWidth * 1000) / tickerSpeed, 79 "linear", 80 function () { 81 firstItem.appendTo(firstItem.parent()).css("marginLeft", 0); 82 moveTicker(); 83 } 84 ); 85 } 86 87 if (pauseOnHover) { 88 $(".ticker").hover( 89 function () { 90 $(".ticker-item").stop(); 91 }, 92 function () { 93 moveTicker(); 94 } 95 ); 96 } 97 98 moveTicker(); 99});
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.