1/* global Swiper */ 2(function (window, $) { 3 'use strict'; 4 // Set Namespace 5 var APP = window.APP = window.APP || {}; 6 7 // ã°ãã¼ãã«ã¹ã³ã¼ãã§isIEãå®ç¾© 8 var isIE = navigator.userAgent.toLowerCase().indexOf('msie') > -1 || 9 navigator.userAgent.toLowerCase().indexOf('trident') > -1; 10 11 // ãããã¼é«ãã確å®ã«åå¾ãã颿° 12 APP.getHeaderHeight = function() { 13 var $header = $('.l-header'); 14 15 if (!$header.length) { 16 return 0; 17 } 18 19 // PC表示ã®å ´åï¼768px以ä¸ï¼ 20 if ($(window).width() > 768) { 21 var $headerTop = $('.l-header-top'); 22 var $headerBottom = $('.l-header-bottom'); 23 24 if ($headerTop.length && $headerBottom.length && 25 $headerTop.is(':visible') && $headerBottom.is(':visible')) { 26 var topHeight = $headerTop.outerHeight() || 0; 27 var bottomHeight = $headerBottom.outerHeight() || 0; 28 return topHeight + bottomHeight; 29 } 30 } 31 32 var height = $header.outerHeight() || 0; 33 34 if (height === 0 && $header[0]) { 35 height = $header[0].getBoundingClientRect().height; 36 } 37 38 return height; 39 }; 40 41 // ãã¼ã¸ããããã¿ã³å¶å¾¡ 42 APP.SetPageTop = function($elm) { 43 var that = this; 44 that.$elm = $elm; 45 that.$body = $('body'); 46 that.$footer = $('.l-footer'); 47 that.scr = $(window).scrollTop(); 48 that.winH = $(window).height(); 49 that.maxH = 0; 50 51 $(window).on('load resize scroll', function() { 52 that.update(); 53 }); 54 }; 55 APP.SetPageTop.prototype = { 56 update: function() { 57 var that = this; 58 that.scr = $(window).scrollTop(); 59 that.winH = $(window).height(); 60 that.maxH = that.$footer.offset().top - that.winH; 61 if (that.scr >= that.maxH) { 62 that.$body.addClass('is-pagetop-fixed'); 63 that.$elm.css({'bottom': that.$footer.outerHeight() + 20 +'px'}); 64 } else if (that.scr > that.winH/2 && that.scr < that.maxH) { 65 that.$body.addClass('is-pagetop-active').removeClass('is-pagetop-fixed'); 66 that.$elm.removeAttr('style'); 67 } else { 68 that.$body.removeClass('is-pagetop-active is-pagetop-fixed'); 69 that.$elm.removeAttr('style'); 70 } 71 } 72 }; 73 74 // PCãµã¤ãºæã®é¢æ° 75 var funcPC = function () { 76 // ç»åã®åãæ¿ãï¼æ¢ã«PCç»åã®å ´åã¯ã¹ãããï¼ 77 $('.spImg').each(function () { 78 var $img = $(this); 79 var currentSrc = $img.attr('src'); 80 81 if (currentSrc && currentSrc.indexOf('_pc.') > -1) { 82 return true; 83 } 84 85 if (currentSrc && currentSrc.indexOf('_sp.') > -1) { 86 var newSrc = currentSrc.replace('_sp.', '_pc.'); 87 $img.attr('src', newSrc); 88 } 89 }); 90 91 // â ã¹ã©ã¤ãã¼ã®ã¤ã³ã©ã¤ã³ã¹ã¿ã¤ã«ã®ã¿ããªã»ããï¼ã¯ã©ã¹ã¯æ®ãï¼ â 92 $('#usefulInfo .imgLinkList').removeAttr('style'); 93 $('#usefulInfo .imgLinkList li').removeAttr('style'); 94 $('#usefulInfo .imgLinkList .imgBox').removeAttr('style'); 95 $('#usefulInfo .imgLinkList .txtBox').removeAttr('style'); 96 $('#usefulInfo .imgLinkList a').removeAttr('style'); 97 98 // SPç¨ã®ã¢ã³ã¼ãã£ãªã³ã¤ãã³ããè§£é¤ 99 $('.hx-outer.close h2').off('click'); 100 $('.faqArea dl dt.close').off('click'); 101 $('h2.close').off('click'); 102 $('h3.close').off('click'); 103 $('#linksArea dl dt').off('click'); 104 $('.newsBox.news1 th').off('click'); 105 $('#main .faq dt').off('click'); 106 107 // ã¢ã³ã¼ãã£ãªã³ãéããç¶æ ã«ãã 108 $('.hx-outer.close').next('div').show(); 109 $('.faqArea dl dt.close').next().show(); 110 $('h2.close').next('div').show(); 111 $('h3.close').next('div').show(); 112 $('#linksArea dl dd').show(); 113 $('.newsBox.news1 td').show(); 114 }; 115 116 // ã¹ãããµã¤ãºæã®é¢æ° 117 var funcSP = function () { 118 // ç»åã®åãæ¿ãï¼æ¢ã«SPç»åã®å ´åã¯ã¹ãããï¼ 119 $('.spImg').each(function () { 120 var $img = $(this); 121 var currentSrc = $img.attr('src'); 122 123 if (currentSrc && currentSrc.indexOf('_sp.') > -1) { 124 return true; 125 } 126 127 if (currentSrc && currentSrc.indexOf('_pc.') > -1) { 128 var newSrc = currentSrc.replace('_pc.', '_sp.'); 129 $img.attr('src', newSrc); 130 } 131 });
132 133 // ã¢ã³ã¼ãã£ãªã³ã®åæç¶æ ãè¨å®ï¼å ¨ã¦éããï¼ 134 $('.hx-outer.close').next('div').hide(); 135 $('.faqArea dl dt.close').next().hide(); 136 $('h2.close').next('div').hide(); 137 $('h3.close').next('div').hide(); 138 $('#linksArea dl dd').hide(); 139 140 // ãã¥ã¼ã¹ã¨ãªã¢ãéããç¶æ ã«ããï¼openã¯ã©ã¹ãåé¤ããã ãï¼ 141 $('.newsBox.news1 th').removeClass('open'); 142 $('.newsBox.news1 td').removeClass('open'); 143 144 // ã¢ã³ã¼ãã£ãªã³æ©è½ 145 $('.hx-outer.close h2').off('click').on('click', function () { 146 $(this).parent().next('div').slideToggle(0); 147 $(this).parent().toggleClass('open'); 148 }); 149 150 $('.faqArea dl dt.close').off('click').on('click', function () { 151 $(this).next().slideToggle(0); 152 $(this).toggleClass('open'); 153 }); 154 155 $('h2.close').off('click').on('click', function () { 156 $(this).next('div').slideToggle(0); 157 $(this).toggleClass('open'); 158 }); 159 160 $('h3.close').off('click').on('click', function () { 161 $(this).next('div').slideToggle(0); 162 $(this).toggleClass('open'); 163 }); 164 165 $('#linksArea dl dt').off('click').on('click', function () { 166 $(this).next('dd').slideToggle(0); 167 $(this).toggleClass('open'); 168 }); 169 170 // â ãã¥ã¼ã¹ã¨ãªã¢ã®ã¢ã³ã¼ãã£ãªã³ï¼ã¯ã©ã¹ã®ä»ãå¤ãã ãï¼ â 171 $('.newsBox.news1 th').off('click').on('click', function () { 172 $(this).toggleClass('open'); 173 $(this).next('td').toggleClass('open'); 174 }); 175 176 $('#main .faq dt').off('click').on('click', function () { 177 $(this).next('dd').slideToggle(); 178 }); 179 180 // ãã¼ãã«ã®ã¬ã¹ãã³ã·ãå 181 var $table = $('.res01'); 182 if ($table.length > 0) { 183 var headColCount = $table.find('thead td').length + 1; 184 for (var i = 0; i <= headColCount; i++) { 185 var headColLabel01 = $table.find('thead th').html(); 186 var headColLabel02 = $table.find('thead td:nth-child(' + i + ')').html(); 187 $table.find('tr.row2 td:nth-child(' + i + ')').prepend('<p class="tit">ï¼' + headColLabel02 + '</p>'); 188 $table.find('tr.row2 td:nth-child(' + i + ') .tit').wrapInner(headColLabel01); 189 } 190 } 191 192 // leanModalç¨ 193 if (typeof $.fn.leanModal !== 'undefined') { 194 $('a[rel*=leanModal]').leanModal({top: 200, closeButton: '.modal_close'}); 195 } 196 }; 197 198 // DOM Ready 199 $(function () { 200 // ===== Breakpointså¦ç ===== 201 if (typeof $.fn.setBreakpoints !== 'undefined') { 202 $(window).setBreakpoints({ 203 distinct: true, 204 breakpoints: [1, 641] 205 }); 206 207 setTimeout(function () { 208 // bodyè¦ç´ ã§å¤å®ï¼#containerããªãå ´åã®å¯¾å¿ï¼ 209 var $target = $('#container').length ? $('#container') : $('body'); 210 var elms = $target.attr('class') || ''; 211 var timer = false; 212 213 $(window).on('load resize', function(event) { 214 if (event.type === 'resize') { 215 if (timer !== false) { 216 clearTimeout(timer); 217 } 218 timer = setTimeout(function () { 219 var currentClass = $target.attr('class') || ''; 220 if (currentClass !== elms) { 221 location.reload(); 222 } 223 }, 200); 224 } 225 }); 226 }, 350); 227 228 if (!isIE) { 229 $(window).bind('enterBreakpoint1', function () { 230 funcSP(); 231 }); 232 $(window).bind('enterBreakpoint641', function () { 233 funcPC(); 234 }); 235 } else { 236 funcPC(); 237 } 238 } 239 240 // ===== 以ä¸ãæ¢åã®å¦ç ===== 241 242 // ãã¼ã¸å ãªã³ã¯ã®ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 243 $('a[href*="#"], area[href*="#"]').on('click', function (e) { 244 // â target="_blank"ã®å ´åã¯é常åä½ã許å¯ï¼æ°ããã¿ãã§éãï¼ 245 if ($(this).attr('target') === '_blank') { 246 return true; 247 } 248 249 if ($(this).hasClass('no-scroll')) { 250 return true; 251 } 252 253 var href = $(this).attr('href'); 254 var hashIndex = href.indexOf('#'); 255 256 if (hashIndex === -1 || hashIndex === href.length - 1) { 257 return true; 258 } 259 260 var pathPart = href.substring(0, hashIndex); 261 var hashPart = href.substring(hashIndex); 262 263 var currentFullUrl = location.protocol + '//' + location.host + location.pathname; 264 var currentPath = location.pathname; 265 266 var isSamePage = false; 267 268 if (!pathPart) { 269 isSamePage = true; 270 } else if (pathPart === currentPath) { 271 isSamePage = true; 272 } else if (pathPart === currentFullUrl) { 273 isSamePage = true; 274 } else { 275 var linkFullUrl = $('<a>').attr('href', href)[0].href; 276 var linkPath = linkFullUrl.split('#')[0]; 277 if (linkPath === currentFullUrl) { 278 isSamePage = true; 279 } 280 } 281 282 if (!isSamePage) { 283 return true; 284 } 285 286 var $target = $(hashPart); 287 288 if (!$target.length) { 289 return true; 290 } 291 292 e.preventDefault(); 293 294 var isHeaderLink = $(this).closest('.l-header').length > 0;
295 296 if (isHeaderLink) { 297 $('.l-header-bottom-item-menu').hide(); 298 $('.l-header-bottom-menu.js-header-menu li').removeClass('menu-active'); 299 } 300 301 var $parentAccordion = $target.closest('.p-accordion-item'); 302 var $childAccordion = $target.closest('.p-accordion-item-child'); 303 304 if ($target.hasClass('p-faq-accordion-item')) { 305 $parentAccordion = $target; 306 } 307 308 var hasAccordion = $parentAccordion.length || $childAccordion.length; 309 310 if ($parentAccordion.length) { 311 $parentAccordion.addClass('is-opened'); 312 } 313 if ($childAccordion.length) { 314 $childAccordion.addClass('is-opened-child'); 315 } 316 317 var waitTime = hasAccordion ? 150 : (isHeaderLink ? 100 : 0); 318 319 setTimeout(function() { 320 var headerHeight = APP.getHeaderHeight(); 321 var targetOffset = $target.offset().top; 322 var additionalOffset = 20; 323 var scrollPosition = targetOffset - headerHeight - additionalOffset; 324 325 $('html, body').stop().animate({ 326 scrollTop: scrollPosition 327 }, 500, 'swing'); 328 }, waitTime); 329 330 return false; 331 }); 332 333 // ããã¯ã¼ã¡ãã¥ã¼ã®éé 334 $('.js-drawer-btn').on('click', function () { 335 $(this).parent().toggleClass('is-opened'); 336 }); 337 338 // ã¢ã³ã¼ãã£ãªã³ã®éé 339 $('.js-accordion-btn').on('click', function () { 340 $(this).parent().toggleClass('is-opened'); 341 }); 342 343 $('.js-accordion-btn-child').on('click', function (e) { 344 e.stopPropagation(); 345 $(this).parent().toggleClass('is-opened-child'); 346 }); 347 348 // ãã³ãã¼ã¬ã¼ã¡ãã¥ã¼ 349 const ham = $('.c-hamburger'); 350 const hamLine = $('.c-hamburger .deco'); 351 const hamText = $('.c-hamburger .text'); 352 const nav = $('.l-drawer-content'); 353 const drawerLinks = $('.l-drawer-menu li a'); 354 355 function toggleActive() { 356 ham.toggleClass('is-active'); 357 hamLine.toggleClass('is-active'); 358 hamText.toggleClass('is-active'); 359 nav.toggleClass('is-active'); 360 hamText.text(ham.hasClass('is-active') ? 'éãã' : 'ã¡ãã¥ã¼'); 361 } 362 363 ham.on('click', toggleActive); 364 drawerLinks.on('click', function () { 365 if (ham.hasClass('is-active')) { 366 toggleActive(); 367 } 368 if (typeof ScrollTrigger !== 'undefined') { 369 ScrollTrigger.refresh(); // eslint-disable-line 370 } 371 }); 372 373 // Swiperåæå 374 let topSwiper; 375 let recommendSwiper; 376 377 function initTopSwiper() { 378 if (document.querySelector('.js-kv-slider')) { 379 topSwiper = new Swiper('.js-kv-slider', { 380 loop: true, 381 slidesPerView: 1, 382 effect: 'fade', 383 autoplay: { 384 delay: 3000, 385 stopOnLastSlide: false, 386 disableOnInteraction: false, 387 reverseDirection: false 388 }, 389 pagination: { 390 el: '.js-kv-slider-pagination', 391 type: 'bullets', 392 clickable: true 393 }, 394 navigation: { 395 nextEl: '.swiper-button-next', 396 prevEl: '.swiper-button-prev' 397 } 398 }); 399 } 400 } 401 402 function initrecommendSwiper() { 403 if (document.querySelector('.js-recommend-slider')) { 404 recommendSwiper = new Swiper('.js-recommend-slider', { 405 loop: true, 406 slidesPerView: 'auto', 407 watchSlidesProgress: true, 408 grabCursor: true, 409 loopAdditionalSlides: 1, 410 autoplay: { 411 delay: 2000, 412 stopOnLastSlide: false, 413 disableOnInteraction: false, 414 reverseDirection: false 415 }, 416 breakpoints: { 417 300: { centeredSlides: true, spaceBetween: 16 }, 418 768: { centeredSlides: true, spaceBetween: 24 }, 419 1240: { spaceBetween: 24 } 420 }, 421 pagination: { 422 el: '.js-recommend-slider-pagination', 423 type: 'bullets', 424 clickable: true 425 }, 426 navigation: { 427 nextEl: '.swiper-button-next', 428 prevEl: '.swiper-button-prev' 429 } 430 }); 431 } 432 } 433 434 initTopSwiper(); 435 initrecommendSwiper(); 436 437 // 䏿忢ã»åç 438 const sliders = { 439 topSwiper, 440 recommendSwiper 441 }; 442 443 document.querySelectorAll('.play-toggle').forEach(btn => { 444 const targetName = btn.dataset.target; 445 const slider = sliders[targetName]; 446 447 if (slider) { 448 btn.classList.add('is-playing'); 449 btn.setAttribute('aria-label', '忢'); 450 slider.autoplay.start(); 451 452 btn.addEventListener('click', () => { 453 if (btn.classList.contains('is-playing')) { 454 slider.autoplay.stop(); 455 btn.classList.remove('is-playing'); 456 btn.setAttribute('aria-label', 'åç'); 457 } else { 458 slider.autoplay.start(); 459 btn.classList.add('is-playing'); 460 btn.setAttribute('aria-label', '忢'); 461 } 462 }); 463 } 464 });
465 466 // ä»ãã¼ã¸ããã®ã¢ã³ã«ã¼é·ç§»å¯¾å¿ 467 $(window).on('load', function(){ 468 if (location.hash) { 469 var targetId = location.hash; 470 var $target = $(targetId); 471 472 if ($target.length) { 473 $('html, body').scrollTop(0); 474 475 // æ°ã³ã¼ãç¨ã¢ã³ã¼ãã£ãªã³ï¼ãã¹ã¦ã®è¦ªãéã 476 $target.parents('.p-accordion-item').addClass('is-opened'); 477 $target.parents('.p-accordion-item-child').addClass('is-opened-child'); 478 479 // æ§ã³ã¼ãç¨ã¢ã³ã¼ãã£ãªã³ï¼ã¿ã¼ã²ããã®è¦ªè¦ç´ ããã¹ã¦ç¢ºèª 480 $target.parents().each(function() { 481 var $this = $(this); 482 483 // ãã®divã®ç´åã®h2.closeã¾ãã¯h3.closeãéã 484 if ($this.is('div')) { 485 var $prevHeading = $this.prev('h2.close, h3.close'); 486 if ($prevHeading.length > 0) { 487 $prevHeading.addClass('open'); 488 $this.show(); 489 } 490 } 491 492 // .hx-outer.closeã®æ¬¡ã®divãéã 493 if ($this.is('div')) { 494 var $prevHxOuter = $this.prev('.hx-outer.close'); 495 if ($prevHxOuter.length > 0) { 496 $prevHxOuter.addClass('open'); 497 $this.show(); 498 } 499 } 500 }); 501 502 // æè²ãã¼ã³ãã¼ã¸ç¨ã®ã¢ã³ã¼ãã£ãªã³å¯¾å¿ 503 var $accWrap = $target.closest('.accWrap'); 504 if ($accWrap.length > 0) { 505 $accWrap.find('.accIn').show(); 506 $accWrap.find('.accBtn').addClass('open'); 507 } 508 509 // ã¢ã³ã¼ãã£ãªã³ãå®å ¨ã«éãã¦ãããä½ç½®ãåè¨ç®ãã¦ã¹ã¯ãã¼ã« 510 setTimeout(function () { 511 var headerHeight = APP.getHeaderHeight(); 512 var targetOffset = $target.offset().top; 513 var additionalOffset = 20; 514 515 $('html, body').animate({ 516 scrollTop: targetOffset - headerHeight - additionalOffset 517 }, 800, 'swing', function() { 518 if (history.replaceState) { 519 history.replaceState(null, null, targetId); 520 } 521 }); 522 }, 500); 523 } 524 } 525 }); 526 527 // header ã¡ã¬ã¡ãã¥ã¼ã®ééï¼ã¯ãªãã¯æ¹å¼ã»éãããã¿ã³ã»æä»å¶å¾¡ã»ã¹ã¯ãã¼ã«ã¯ãã¼ãºã»åçåãæ¿ã対å¿ï¼ 528 $('.l-header-bottom-menu.js-header-menu > li > a').on('click', function (e) { 529 if ($(window).width() > 768) { 530 var $parentLi = $(this).parent('li'); 531 var $menu = $parentLi.children('.l-header-bottom-item-menu'); 532 533 // ãµãã¡ãã¥ã¼ãæããªãé ç®ï¼ä¾ï¼å½ã®æè²ãã¼ã³ï¼ãã¯ãªãã¯ããå ´å 534 if ($menu.length === 0 || $parentLi.hasClass('menu-02') || $menu.find('.l-header-bottom-item-submenu li').length === 0) { 535 $('.l-header-bottom-item-menu').stop(true, true).hide(); 536 $('.l-header-bottom-menu.js-header-menu li').removeClass('menu-active'); 537 538 // ç¡é§ãªã¹ã¯ãã¼ã«ç£è¦ãè§£é¤ 539 $(window).off('scroll.menu'); 540 541 return true; // é常ã®ãªã³ã¯é·ç§»ãå®è¡ 542 } 543 544 // ãµãã¡ãã¥ã¼ãæã¤å ´åã¯ãã¡ã¬ã¡ãã¥ã¼ãéãããã«ãªã³ã¯é·ç§»ããã£ã³ã»ã« 545 e.preventDefault(); 546 547 // ã¯ãªãã¯ããã¡ãã¥ã¼ãæ¢ã«éãã¦ããå ´åã¯éããï¼ãã°ã«åä½ï¼ 548 if ($parentLi.hasClass('menu-active')) { 549 $menu.stop(true, true).fadeOut(150, 'swing'); 550 $parentLi.removeClass('menu-active'); 551 552 // éããã®ã§ã¹ã¯ãã¼ã«ç£è¦ãè§£é¤ 553 $(window).off('scroll.menu'); 554 } else { 555 // ãæé©æ¡ããã§ã«ä»ã®ã¡ã¬ã¡ãã¥ã¼ãéãã¦ãããã©ãããå¤å® 556 var $activeMenuLi = $('.l-header-bottom-menu.js-header-menu li.menu-active'); 557 558 if ($activeMenuLi.length > 0) { 559 // â¼ å¥ã®ã¡ãã¥ã¼ãæ¢ã«éãã¦ããå ´å â¼ 560 // èæ¯ã®ãã©è¦ãããæåã®éãªãï¼ã¯ãã¹ãã§ã¼ãï¼ãé²ããããã¢ãã¡ã¼ã·ã§ã³ãªãã§å³åº§ã«åãæ¿ãã 561 $('.l-header-bottom-item-menu').not($menu).stop(true, true).hide(); 562 $activeMenuLi.removeClass('menu-active'); 563 564 $menu.stop(true, true).show(); 565 $parentLi.addClass('menu-active'); 566 } else { 567 // â¼ ä½ãéãã¦ããªãç¶æ ããã®å±éã®å ´å â¼
568 // æ»ããã«ãã§ã¼ãã¤ã³ããã 569 $menu.stop(true, true).fadeIn(150, 'swing'); 570 $parentLi.addClass('menu-active'); 571 } 572 573 // ã¹ã¯ãã¼ã«æã«ã¡ã¬ã¡ãã¥ã¼ãéããå¦ç 574 $(window).off('scroll.menu').on('scroll.menu', function () { 575 $('.l-header-bottom-item-menu').stop(true, true).fadeOut(150, 'swing'); 576 $('.l-header-bottom-menu.js-header-menu li').removeClass('menu-active'); 577 578 // 1度éããããã¹ã¯ãã¼ã«ã¤ãã³ãã®ç£è¦ãå³åº§ã«è§£é¤ï¼ããã©ã¼ãã³ã¹ä½ä¸é²æ¢ï¼ 579 $(window).off('scroll.menu'); 580 }); 581 } 582 } 583 }); 584 585 // éãããã¿ã³ã¯ãªãã¯æã®å¦ç 586 $('.js-header-close-btn').on('click', function (e) { 587 e.preventDefault(); 588 var $menu = $(this).closest('.l-header-bottom-item-menu'); 589 var $parentLi = $(this).closest('li'); 590 591 // ã¡ã¬ã¡ãã¥ã¼ããã§ã¼ãã¢ã¦ããããã¢ã¯ãã£ãç¶æ ãè§£é¤ 592 $menu.stop(true, true).fadeOut(150, 'swing'); 593 $parentLi.removeClass('menu-active'); 594 595 // ã¡ãã¥ã¼ãéããã®ã§ã¹ã¯ãã¼ã«ç£è¦ãè§£é¤ 596 $(window).off('scroll.menu'); 597 }); 598 599 // ã¡ã¬ã¡ãã¥ã¼é åå¤ã®ä½ç½ãªã©ãã¯ãªãã¯ããå ´åããéãã¦ããã¡ãã¥ã¼ãéããï¼ãã§ã¤ã«ã»ã¼ãï¼ 600 $(document).on('click', function(e) { 601 if ($(window).width() > 768) { 602 // ã¯ãªãã¯ãããå ´æããããã¼ã¡ãã¥ã¼ç¾¤ã®ä¸ã§ãªããã°éãã 603 if (!$(e.target).closest('.l-header-bottom-menu.js-header-menu').length) { 604 // ä½ãã¡ãã¥ã¼ãéãã¦ããå ´åã®ã¿å¦çãå®è¡ 605 if ($('.l-header-bottom-menu.js-header-menu li.menu-active').length > 0) { 606 $('.l-header-bottom-item-menu').stop(true, true).fadeOut(150, 'swing'); 607 $('.l-header-bottom-menu.js-header-menu li').removeClass('menu-active'); 608 609 // ã¡ãã¥ã¼ãéããã®ã§ã¹ã¯ãã¼ã«ç£è¦ãè§£é¤ 610 $(window).off('scroll.menu'); 611 } 612 } 613 } 614 }); 615 // header ã¡ã¬ã¡ãã¥ã¼ã®ééï¼ã¯ãªãã¯æ¹å¼ã»éãããã¿ã³ã»æä»å¶å¾¡ã»ã¹ã¯ãã¼ã«ã¯ãã¼ãºå¯¾å¿ï¼ããã¾ã§ 616 617 // ã¿ãåãæ¿ã 618 $('.js-tab li').on('click', function () { 619 const selected = $(this).data('tab'); 620 621 $('.js-tab li').removeClass('is-active'); 622 $(this).addClass('is-active'); 623 624 $('.js-tab-content').removeClass('is-active'); 625 $('.js-tab-content[data-tab="' + selected + '"]').addClass('is-active'); 626 627 // ã¿ãã®ç¶æ ãURLããã·ã¥ã«ä¿å 628 if (history.replaceState) { 629 history.replaceState(null, null, '#tab-' + selected); 630 } else { 631 location.hash = 'tab-' + selected; 632 } 633 }); 634 635 // ãã¼ã¸ãã¼ãæããã³ãã©ã¦ã¶ããã¯æã«ã¿ãã®ç¶æ ã復å 636 function restoreTabState() { 637 var hash = location.hash; 638 639 if (hash && hash.indexOf('#tab-') === 0) { 640 var tabName = hash.replace('#tab-', ''); 641 var $targetTab = $('.js-tab li[data-tab="' + tabName + '"]'); 642 var $targetContent = $('.js-tab-content[data-tab="' + tabName + '"]'); 643 644 if ($targetTab.length > 0 && $targetContent.length > 0) { 645 $('.js-tab li').removeClass('is-active'); 646 $('.js-tab-content').removeClass('is-active'); 647 648 $targetTab.addClass('is-active'); 649 $targetContent.addClass('is-active'); 650 } 651 } 652 } 653 654 // ãã¼ã¸ãã¼ãæã«ã¿ãã®ç¶æ ã復å 655 if ($('.js-tab').length > 0) { 656 restoreTabState(); 657 } 658 659 // ãã©ã¦ã¶ã®æ»ã/é²ããã¿ã³å¯¾å¿ 660 $(window).on('hashchange', function() { 661 if (location.hash && location.hash.indexOf('#tab-') === 0) { 662 restoreTabState(); 663 } 664 }); 665 666 // matchHeight 667 $(window).on('load', function () { 668 $('.p-page-rate-business-box .box h3').matchHeight(); 669 $('.p-page-saftynet-saftynet-related-box .box h3').matchHeight();
670 $('.p-page-saftynet-saftynet-other-box .box h3').matchHeight(); 671 $('.p-column-box .box h3').matchHeight(); 672 $('.p-page-service-heijitsu_soudan-contact-box .box h3').matchHeight(); 673 $('.p-column-box.col-2 .box h4').matchHeight(); 674 $('.p-page-finance-direct-content-item h3').matchHeight(); 675 $('.p-page-finance-direct-content-item .body').matchHeight(); 676 $('.p-page-finance-saftynet-saftynet-content-box h3').matchHeight(); 677 $('.p-page-service-apply-support .p-column-box .box .content').matchHeight(); 678 $('.p-page-service-econtract-kn-content .p-column-box .box .content').matchHeight(); 679 $('.p-page-voice .p-column-box .box .content').matchHeight(); 680 $('.p-page-finance-search-c-content ul li').matchHeight(); 681 }); 682 683 // ãã³ãããªã¹ãã®ä¸è¦ãªè¨å·ãåé¤ 684 if ($('#topic-path').length > 0) { 685 $('#topic-path li').each(function() { 686 var html = $(this).html(); 687 688 if (!html) { 689 return; 690 } 691 692 // æ§ã ãªãã¿ã¼ã³ã®è¨å·ã»ã¹ãã¼ã¹ãåé¤ 693 html = html.replace(/ >/gi, ''); // > 694 html = html.replace(/ >/gi, ''); // > 695 html = html.replace(/>/gi, ''); // > 696 html = html.replace(/ /gi, ''); // 697 html = html.replace(/\u00A0>/g, ''); // non-breaking space + > 698 html = html.replace(/\u00A0/g, ''); // non-breaking space 699 html = html.replace(/\s*>\s*$/g, ''); // æ«å°¾ã® > ã¨åå¾ã®ã¹ãã¼ã¹ 700 701 $(this).html(html.trim()); 702 }); 703 } 704 705 }); // DOM Readyçµäº 706 707})(window, jQuery);
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.