1(() => { 2 // javascript/script.js 3 jQuery(function($) { 4 var $nav = $("#masthead"); 5 $(document).scroll(function() { 6 $nav.toggleClass("scrolled", $(this).scrollTop() > $nav.height()); 7 }); 8 $(document).ready(function() { 9 if ($(this).scrollTop() > $nav.height()) { 10 $nav.addClass("scrolled"); 11 } 12 }); 13 var lastScrollTop = 0; 14 $(window).scroll(function() { 15 let scroll = $(window).scrollTop(); 16 if (scroll > lastScrollTop) { 17 if (scroll > 15) { 18 $nav.css({ transform: "translateY(-100%)" }); 19 } 20 } else { 21 $nav.css({ transform: "translateY(0)" }); 22 } 23 lastScrollTop = scroll; 24 }); 25 $(document).ready(function() { 26 $("#primary-menu > li.menu-item-has-children").hover( 27 function() { 28 $(this).addClass("open"); 29 }, 30 function() { 31 $(this).removeClass("open"); 32 } 33 ); 34 }); 35 $(document).ready(function() { 36 let swiper = new Swiper(".swiper", { 37 // Optional parameters 38 loop: true, 39 slidesPerView: "auto", 40 spaceBetween: 20, 41 observer: true, 42 observeParents: true, 43 freeMode: { 44 enabled: true, 45 sticky: true 46 }, 47 navigation: { 48 nextEl: ".slider-btn.next", 49 prevEl: ".slider-btn.prev" 50 } 51 }); 52 let singleSwiper = new Swiper(".single-swiper", { 53 // Optional parameters 54 loop: true, 55 slidesPerView: "1", 56 observer: true, 57 observeParents: true, 58 spaceBetween: 48, 59 effect: "fade", 60 autoplay: { 61 delay: "3500", 62 disableOnInteraction: false 63 }, 64 navigation: { 65 nextEl: ".slider-btn.next", 66 prevEl: ".slider-btn.prev" 67 } 68 }); 69 }); 70 let SwiperTop = new Swiper(".swiper--top", { 71 spaceBetween: 24, 72 centeredSlides: true, 73 speed: 3e3, 74 autoplay: { 75 delay: 1 76 }, 77 loop: true, 78 slidesPerView: "auto", 79 allowTouchMove: false, 80 disableOnInteraction: true 81 // preventInteractionOnTransition: true 82 }); 83 let SwiperBottom = new Swiper(".swiper--bottom", { 84 spaceBetween: 24, 85 centeredSlides: true, 86 speed: 3e3, 87 autoplay: { 88 delay: 1, 89 reverseDirection: true 90 }, 91 loop: true, 92 slidesPerView: "auto", 93 allowTouchMove: false, 94 disableOnInteraction: true 95 }); 96 var $cell = $(".acc-item "); 97 $cell.find(".js-expander").click(function() { 98 var $thisCell = $(this).closest(".acc-item "); 99 if ($thisCell.hasClass("is-collapsed")) { 100 $cell.not($thisCell).removeClass("is-expanded").addClass("is-collapsed").addClass("is-inactive"); 101 $thisCell.removeClass("is-collapsed").addClass("is-expanded"); 102 if ($cell.not($thisCell).hasClass("is-inactive")) { 103 } else { 104 $cell.not($thisCell).addClass("is-inactive"); 105 } 106 } else { 107 $thisCell.removeClass("is-expanded").addClass("is-collapsed"); 108 $cell.not($thisCell).removeClass("is-inactive"); 109 } 110 }); 111 $cell.find(".js-collapser").click(function() { 112 var $thisCell = $(this).closest(".acc-item "); 113 $thisCell.removeClass("is-expanded").addClass("is-collapsed"); 114 $cell.not($thisCell).removeClass("is-inactive"); 115 }); 116 }); 117 document.addEventListener("DOMContentLoaded", function() { 118 function addBodyClass() { 119 document.body.classList.add("modal-open"); 120 } 121 function removeBodyClass() { 122 document.body.classList.remove("modal-open"); 123 } 124 document.addEventListener("show.hs.modal", function(e) { 125 addBodyClass(); 126 }); 127 document.addEventListener("hide.hs.modal", function(e) { 128 removeBodyClass(); 129 }); 130 }); 131})();
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.