1'use strict'; 2 3 4/* 5// webp/pngç»åãåå¨ããªãå ´åã®ãã©ã¼ã«ããã¯ï¼Swiperã¯ãã¼ã³å«ãcaptureã§å¯¾å¿ï¼ 6document.addEventListener('error', function(e) { 7 const img = e.target; 8 if (img.tagName !== 'IMG') return; 9 const picture = img.closest('picture'); 10 if (!picture) return; 11 // ã¾ãwebpã½ã¼ã¹ãåé¤ãã¦jpg/pngã½ã¼ã¹ã§åè©¦è¡ 12 const webpSources = picture.querySelectorAll('source[type="image/webp"]'); 13 if (webpSources.length) { 14 webpSources.forEach(s => s.remove()); 15 img.src = img.src; 16 return; 17 } 18 // jpg/pngã½ã¼ã¹ã失æããå ´åãå ¨ã½ã¼ã¹ãåé¤ãã¦<img>ã®srcã§åè©¦è¡ 19 const allSources = picture.querySelectorAll('source'); 20 if (allSources.length) { 21 allSources.forEach(s => s.remove()); 22 img.src = img.src; 23 } 24}, true); // captureãã§ã¼ãºï¼errorã¯ãããªã³ã°ããªãããå¿ é 25 */ 26 27 28 29 30 31 32 33//ã¹ã ã¼ãºã¹ã¯ãã¼ã« 34$('a[href^="#"]').not('.OverlayBtn').click(function(){ 35 36 37 let speed = 500; 38 let href= $(this).attr("href"); 39 let target = $(href == "#" || href == "" ? 'html' : href); 40 let position = target.offset().top; 41 42 let header_spH = $('.l-HeaderSp').height(); 43 let header_H = $('.l-HeaderPc__bottom').height(); 44 45 let w = $(window).innerWidth(); 46 if (w <= 959 ) { 47 // spå¹ 48 $("html, body").animate({scrollTop:position - header_spH }, speed, "swing"); 49 } else if (w > 959 ) { 50 // pcå¹ 51 $("html, body").animate({scrollTop:position - header_H }, speed, "swing"); 52 // $("html, body").animate({scrollTop:position }, speed, "swing"); 53 } 54 return false; 55}); 56 57 58 59//ãã«ãã¦ã³ 60{ 61 const $footer = $('.js-footerSitemap'); 62 $footer.find('.js-accordionTrigger').on('click', function () { 63 if( $(this).next().hasClass('js-accordionPanel') ){ 64 $(this).next('.js-accordionPanel').slideToggle(200); 65 $footer.find('.js-accordionPanel').not($(this).next('.js-accordionPanel')).slideUp(200); 66 $(this).closest('.js-accordion').toggleClass("is-open"); 67 $footer.find('.js-accordionTrigger').not($(this)).closest('.js-accordion').removeClass('is-open'); } 68 }); 69} 70 71 72 73//ã¹ã¯ãã¼ã«ããããããã¼ã«å½±ãã¤ãã 74$(window).on('scroll load', function(){ 75 let $Header = $('.js-header'); 76 let $Header_sp = $('.js-headerSp'); 77 let scrollTop = $(window).scrollTop(); 78 if ( scrollTop > 0) { 79 $Header.addClass('is-active'); 80 $Header_sp.addClass('is-active'); 81 } else { 82 $Header.removeClass('is-active'); 83 $Header_sp.removeClass('is-active'); 84 } 85}); 86 87 88 89//ãã¼ã¸ãããã¸ãã¿ã³ 90{ 91 const $window = $(window); 92 const $PageTopBtn = $('.js-pageTopBtn'); 93 94 //ã¹ã¯ãã¼ã«ã§è¡¨ç¤ºé表示 95 $PageTopBtn.hide(); 96 $window.on('scroll', function() { 97 if ( $(this).scrollTop() < 200) { 98 $PageTopBtn.fadeOut(200); 99 } else { 100 $PageTopBtn.fadeIn(200); 101 } 102 }); 103 // ãã¼ã¸ãããã¸ã¹ã¯ãã¼ã« 104 $PageTopBtn.on('click', function() { 105 let speed = 500; 106 $("html, body").animate({ scrollTop: 0 }, speed, "swing"); 107 return false; 108 }); 109} 110 111 112 113//SPããã¼ã¯ã¼ã¡ãã¥ã¼ 114{ 115 const $body = $('body'); 116 const $DrawerBtn = $('.js-drawerBtn'); 117 const $Drawer = $('.js-drawer'); 118 const $Drawer__close = $('.js-drawerClose'); 119 $DrawerBtn.on('click', function(){ 120 $Drawer.fadeIn(200); //ãªã¼ãã¼ã¬ã¤ã®ããã¯ã¹ãã©ãã«ããã®ã 121 $Drawer.scrollTop(0); 122 $body.addClass('is-open'); 123 }); 124 $Drawer__close.on('click', function(e){ 125 e.preventDefault(); 126 $Drawer.fadeOut(0); 127 $body.removeClass('is-open'); 128 }); 129 window.onpageshow = function(event) { //ãã©ã¦ã¶ããã¯ã§æ»ã£ã¦ããå ´åã¯ããã¼ãã¼ãéãã 130 if (event.persisted) { 131 $Drawer.fadeOut(0); 132 $body.removeClass('is-open'); 133 } 134 }; 135} 136 137 138 139//ã¡ã¬ã¡ãã¥ã¼ 140{ 141 const $links = $('.js-headerPcPulldownLink'); 142 143 $links.on('click', function(){ 144 const $this = $(this); 145 const isOpen = $this.hasClass('is-open'); 146 $links.removeClass('is-open'); 147 if (!isOpen) $this.addClass('is-open'); 148 }); 149 150 $('.js-headerPcClose').on('click', function(){ 151 $links.removeClass('is-open'); 152 }); 153 154 window.onpageshow = function(event) { //ãã©ã¦ã¶ããã¯ã§æ»ã£ã¦ããå ´åã¯ããã¼ãã¼ãéãã 155 if (event.persisted) { 156 $links.removeClass('is-open'); 157 } 158 }; 159}
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.