1document.addEventListener('DOMContentLoaded', function () { 2 // Handle navigable parent menu items 3 var menuItems = document.querySelectorAll('.nav .nav-link'); 4 5 function handleMenuClick(e) { 6 console.log('menu item clicked'); 7 e.preventDefault(); 8 location.href = this.getAttribute('href'); 9 } 10 11 for (var i = 0; i < menuItems.length; i++) { 12 menuItems[i].addEventListener('click', handleMenuClick); 13 } 14}); 15 16document.addEventListener('DOMContentLoaded', function () { 17 // Handle tab functionality 18 var tabs = document.querySelectorAll('.tabs-box .tab-buttons .tab-btn'); 19 tabs.forEach(function (btn) { 20 btn.addEventListener('click', function (e) { 21 e.preventDefault(); 22 var targetSelector = this.getAttribute('data-tab'); 23 var target = document.querySelector(targetSelector); 24 25 if (!target.classList.contains('active-tab')) { 26 var tabsBox = this.closest('.tabs-box'); 27 tabsBox.querySelectorAll('.tab-buttons .tab-btn').forEach(function (btn) { 28 btn.classList.remove('active-btn'); 29 }); 30 this.classList.add('active-btn'); 31 32 tabsBox.querySelectorAll('.tabs-content .tab').forEach(function (tab) { 33 tab.classList.remove('active-tab'); 34 }); 35 36 target.classList.add('active-tab'); 37 } 38 }); 39 }); 40 41 // Sticky header functionality 42 var topPos = window.pageYOffset || document.documentElement.scrollTop; 43 var header = document.getElementById('header'); 44 45 if (topPos > 500) { 46 header.classList.add('sticky-top'); 47 } else { 48 if (topPos === 0) { 49 header.classList.remove('sticky-top'); 50 } 51 } 52 53 window.addEventListener('scroll', function () { 54 var topPos = window.pageYOffset || document.documentElement.scrollTop; 55 var header = document.getElementById('header'); 56 if (topPos > 500) { 57 header.classList.add('sticky-top'); 58 } else { 59 if (topPos === 0) { 60 header.classList.remove('sticky-top'); 61 } 62 } 63 }); 64}); 65 66 67document.addEventListener('DOMContentLoaded', function () { 68 const personalCheck = document.getElementById('personal-account'); 69 const businessCheck = document.getElementById('business-account'); 70 const personalForm = document.getElementById('pbi-form'); 71 const businessForm = document.getElementById('ebc-form'); 72 73 function toggleForms(showPersonal) { 74 businessForm.style.display = showPersonal ? 'none' : 'block'; 75 personalForm.style.display = showPersonal ? 'block' : 'none'; 76 } 77 personalCheck.addEventListener('click', () => toggleForms(true)); 78 businessCheck.addEventListener('click', () => toggleForms(false)); 79 }); 80 81 82document.addEventListener('DOMContentLoaded', function () { 83 var topmenuLinks = document.querySelectorAll('.topmenu-links a'); 84 var mobileMenuLinks = document.querySelectorAll('#mobile_menu .nav-link'); 85 var footerLinks = document.querySelectorAll('.footer-link'); 86 var copyrightLinks = document.querySelectorAll('.copyright-link'); 87 var currentLocation = window.location.pathname; 88 89 function activateLink(links) { 90 links.forEach(function (link) { 91 if (link.getAttribute('href') === currentLocation) { 92 link.classList.add('active'); 93 } 94 }); 95 } 96 97 activateLink(topmenuLinks); 98 activateLink(mobileMenuLinks); 99 activateLink(footerLinks); 100 activateLink(copyrightLinks); 101}); 102
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.