1{ 2 $(function () { 3 4 const $header = $("header"); 5 const $footer = $("footer"); 6 const $pagetop = $("#pagetop"); 7 const $nab_mobaile = $(".global-nav-mobile-menu"); 8 9 10 const hideClass = "is-hidden"; 11 let isHidden = false; 12 13 $(window).on("scroll", function () { 14 15 const scrollTop = $(window).scrollTop(); 16 const footerTop = $footer.offset().top; 17 const headerHeight = $header.outerHeight(); 18 19 if (scrollTop + headerHeight >= footerTop) { 20 if (!isHidden) { 21 $header.addClass(hideClass); 22 $nab_mobaile.addClass(hideClass); 23 isHidden = true; 24 } 25 } else { 26 if (isHidden) { 27 $header.removeClass(hideClass); 28 $nab_mobaile.removeClass(hideClass); 29 isHidden = false; 30 } 31 } 32 }); 33 34 $pagetop.on("click", function (e) { 35 e.preventDefault(); 36 37 $("html, body").animate({ scrollTop: 0 }, 500, function () { 38 $header.removeClass(hideClass); 39 $nab_mobaile.removeClass(hideClass); 40 isHidden = false; 41 }); 42 }); 43 44 }); 45 46 document.querySelectorAll('.global-nav-item.no-pointer > a').forEach((a) => { 47 a.addEventListener('click', (e) => { 48 e.preventDefault(); 49 }); 50 }); 51 52 // ãã³ãã¼ã¬ã¼ã¡ãã¥ã¼ééæã®ã¹ã¯ãã¼ã«å¶å¾¡ 53 const mobileNav = document.getElementById('global-nav-mobile'); 54 55 const mobileNavObserver = new MutationObserver(() => { 56 if (window.innerWidth <= 1099) { 57 if (mobileNav.classList.contains('is-active')) { 58 document.body.classList.add('is-locked'); 59 60 // åliãé çªã«è¡¨ç¤º 61 const items = mobileNav.querySelectorAll('.global-nav-mobile-item.level-1'); 62 const spHidden = mobileNav.querySelector('.header-item-nav-right-fixed.sp-hidden'); 63 64 items.forEach((item, index) => { 65 item.classList.remove('is-visible'); 66 setTimeout(() => { 67 item.classList.add('is-visible'); 68 }, index * 80); 69 }); 70 71 // sp-hiddenãliã®æå¾ã®å¾ã«è¡¨ç¤º 72 if (spHidden) { 73 spHidden.classList.remove('is-visible'); 74 setTimeout(() => { 75 spHidden.classList.add('is-visible'); 76 }, items.length * 80); 77 } 78 79 } else { 80 document.body.classList.remove('is-locked'); 81 82 const items = mobileNav.querySelectorAll('.global-nav-mobile-item.level-1'); 83 const spHidden = mobileNav.querySelector('.header-item-nav-right-fixed.sp-hidden'); 84 85 items.forEach(item => item.classList.remove('is-visible')); 86 if (spHidden) spHidden.classList.remove('is-visible'); 87 } 88 } 89 }); 90 91 mobileNavObserver.observe(mobileNav, { attributes: true, attributeFilter: ['class'] }); 92}
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.