1/** 2 * AJEC3 Main JavaScript 3 * æ±ç¨ã¹ã¯ãªãã 4 */ 5(function() { 6 'use strict'; 7 8 // ã¹ã ã¼ã¹ã¹ã¯ãã¼ã«ï¼ãã¼ã¸å ãªã³ã¯ï¼ 9 document.addEventListener('click', function(e) { 10 var anchor = e.target.closest('a[href^="#"]'); 11 if (!anchor) return; 12 13 var targetId = anchor.getAttribute('href'); 14 if (targetId === '#') return; 15 16 var target = document.querySelector(targetId); 17 if (target) { 18 e.preventDefault(); 19 target.scrollIntoView({ behavior: 'smooth', block: 'start' }); 20 } 21 }); 22 23 // ãã¼ã¸ããããã¿ã³ 表示/é表示 24 var topBtn = document.getElementById('back-to-top'); 25 if (topBtn) { 26 var scrollThreshold = 400; 27 28 function toggleTopBtn() { 29 if (window.scrollY > scrollThreshold) { 30 topBtn.classList.add('is-visible'); 31 } else { 32 topBtn.classList.remove('is-visible'); 33 } 34 } 35 36 window.addEventListener('scroll', toggleTopBtn, { passive: true }); 37 toggleTopBtn(); 38 } 39 40 // SP åºå®è¿½å°¾CTA: ããã¿ã¼é åã«å°éãããé ãï¼ä»¥éããã¿ã¼æ«å°¾ã¾ã§é ããã¾ã¾ï¼ 41 var spCtaBar = document.getElementById('sp-cta-bar'); 42 var footerCta = document.querySelector('.footer-cta'); 43 if (spCtaBar && footerCta) { 44 function toggleSpCta() { 45 // ããã¿ã¼CTAã®ä¸ç«¯ããã¥ã¼ãã¼ãå ã«å ¥ã£ããï¼ããã¿ã¼é åãè¦ã¦ãã 46 var reachedFooter = footerCta.getBoundingClientRect().top < window.innerHeight; 47 spCtaBar.classList.toggle('is-hidden', reachedFooter); 48 } 49 window.addEventListener('scroll', toggleSpCta, { passive: true }); 50 window.addEventListener('resize', toggleSpCta, { passive: true }); 51 toggleSpCta(); 52 } 53 54})();
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.