1document.addEventListener('DOMContentLoaded', () => { 2 document.addEventListener('scroll', () => { 3 let scroll = window.scrollY; // Use window.scrollY directly 4 const menuContainer = document.querySelector('.menu-container'); // Use querySelector for a single element 5 6 if (scroll > 50) { 7 menuContainer?.classList.add('shrink-menu'); // Use optional chaining to avoid errors 8 } else { 9 menuContainer?.classList.remove('shrink-menu'); 10 } 11 }); 12}); 13 14 // Add accordion functionality to collapsible elements in the bottom section 15 document.addEventListener('DOMContentLoaded', function() { 16 // Get all collapse elements in the bottom banner 17 const collapseElements = document.querySelectorAll('.bg-black-banner-bottom .collapse'); 18 19 // Add data-bs-parent attribute to create accordion behavior 20 collapseElements.forEach(function(collapse) { 21 collapse.setAttribute('data-bs-parent', '#accordionServices'); 22 }); 23 24 // Wrap the collapsible items in an accordion container for proper grouping 25 const row = document.querySelector('.bg-black-banner-bottom .row:last-child'); 26 if (row) { 27 row.id = 'accordionServices'; 28 } 29 });
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.