1/* ************************************************** 2 3Name: common2.js 4 5Description: Common Settings 6 7Create: 2021.08.01 8 9Copyright 2021 Hitachi, Ltd. 10 11***************************************************** */ 12 13$.extend({ 14 15 // ç»é¢ãµã¤ãº 16 isLG : function(){ 17 return (window.innerWidth || document.documentElement.clientWidth) >= 995 18 }, 19 isMD : function(){ 20 return (window.innerWidth || document.documentElement.clientWidth) < 995 21 }, 22 isSM : function(){ 23 return (window.innerWidth || document.documentElement.clientWidth) < 768 24 }, 25 isXS : function(){ 26 return (window.innerWidth || document.documentElement.clientWidth) < 580 27 }, 28 isXXS : function(){ 29 return (window.innerWidth || document.documentElement.clientWidth) < 400 30 } 31 32}); 33 34 35// ã³ãã¼ã©ã¤ã 36$(function(){ 37 const year1 = parseInt($("#Copyright span").text()); 38 const year2 = (new Date()).getFullYear(); 39 if (isNaN(year1)) return; 40 if (year1 == year2) return; 41 if (year1 < year2) $("#Copyright span").text(year1 + ", " + year2); 42}); 43 44 45// Width Fix 46$(function(){ 47 $("#HeaderArea1, #HeaderArea2, #FooterArea, #HorizontalLocalNaviArea, #Popup #Contents").each(function(){ 48 if($(this).find(">.ContainerFix.Wide").length) { 49 $(this).addClass("FixWide"); 50 return; 51 } 52 if($(this).find(">.ContainerFix").length) { 53 $(this).addClass("Fix"); 54 return; 55 } 56 }); 57}); 58 59// ãµãã¼ãã¡ãã¥ã¼ 60$(function(){ 61 if ($(".SupportNaviIconText").length == 0) { 62 return; 63 } 64 65 const $search = $("#SupportNaviSearch"); 66 const alt = $search.find("img").attr("alt"); 67 68 $(".SupportNaviIconText>a, .SupportNaviIconText>button").each(function(){ 69 if (!$(this).is($search)) { 70 $(this).find("img").attr("alt", null); 71 } 72 }); 73 74 $(window).on("resize.SupportNavi", function(){ 75 if ($.isSM()) { 76 $search.find("img").attr("alt", alt); 77 } else { 78 $search.find("img").attr("alt", null); 79 } 80 }).triggerHandler("resize.SupportNavi"); 81}); 82 83 84// æ¤ç´¢ 85$(function(){ 86 87 const $form = $("#SearchFormArea"); 88 const $header = $("#HeaderArea1"); 89 const $btn = $("button#SupportNaviSearch"); 90 91 if ($form.length == 0 || $btn.length == 0) { 92 return; 93 } 94 95 // æ¤ç´¢ãéã 96 function open() { 97 $("button#SupportNaviLang.is-open").triggerHandler("click"); 98 $("#SpMenuBtn.is-open").triggerHandler("click"); 99 100 if (!$.isSM() || $header.find(".ContainerFix").length) { 101 $form.stop(true, true).slideDown({progress:function(){ 102 $header.css("margin-bottom", $form.outerHeight()); 103 }}); 104 } else { 105 $("html").css("overflow", "hidden"); 106 $("body").addClass("spsearch-open"); 107 $backdrop.appendTo("body").ready(function(){ 108 $backdrop.addClass("show"); 109 }); 110 $form.show().ready(function(){ 111 $form.addClass("show"); 112 }); 113 } 114 115 $btn.addClass("is-open").attr("aria-expanded", "true"); 116 } 117 118 // æ¤ç´¢ãéãã 119 function close() { 120 if (!$.isSM() || $header.find(".ContainerFix").length) { 121 $form.stop(true, true).slideUp({progress:function(){ 122 $header.css("margin-bottom", $form.outerHeight()); 123 }}); 124 } 125 $("html").css("overflow", ""); 126 $("body").removeClass("spsearch-open"); 127 $form.removeClass("show"); 128 $backdrop.removeClass("show"); 129 $btn.removeClass("is-open").attr("aria-expanded", "false"); 130 } 131 132 $form.on("transitionend webkitTransitionEnd", function() { 133 if (!$form.hasClass("show")) { 134 $form.hide(); 135 } 136 }); 137 138 139 // ãµãã¼ãã¡ãã¥ã¼ã®æ¤ç´¢ãã¿ã³ 140 $("button#SupportNaviSearch").on("click", function(){ 141 if ($(this).hasClass("is-open")) { 142 close(); 143 } else { 144 open(); 145 } 146 return false; 147 }); 148 149 // æ¤ç´¢ã¨ãªã¢ã®éãããã¿ã³ 150 $("#SearchFormArea .BtnClose").on("click", function(){ 151 $("button#SupportNaviSearch.is-open").triggerHandler("click"); 152 return false;
153 }); 154 155 // backdrop 156 const $backdrop = $('<div id="SpSearchBackdrop"></div>'); 157 $backdrop.on("transitionend webkitTransitionEnd", function() { 158 if (!$backdrop.hasClass("show")) { 159 $backdrop.detach(); 160 } 161 }); 162 $backdrop.on("click", function(e) { 163 close(); 164 }); 165 166 $(window).on("resize.SearchFormArea", function(){ 167 $form.css("top", $header.height()); 168 169 if ($header.find(".Container").length) { 170 if ($.isSM()) { 171 $header.css("margin-bottom", ""); 172 if ($form.is(":visible") && !$form.hasClass("show")) { 173 close(); 174 } 175 } else { 176 if ($form.is(":visible")) { 177 if ($form.hasClass("show")) close(); 178 $header.css("margin-bottom", $form.outerHeight()); 179 } 180 } 181 } 182 183 return false; 184 }).triggerHandler("resize.SearchFormArea"); 185}); 186 187 188// å°å ãè¨èª 189$(function(){ 190 191 const $menu = $("#LangMenu"); 192 const $btn = $("button#SupportNaviLang"); 193 194 if ($btn.length == 0) return; 195 if ($menu.length == 0) return; 196 197 // ãããããã¦ã³ã®ä½ç½®ã®èª¿æ´ 198 function offset() { 199 if (!$btn.is(":visible")) return; 200 $menu.offset({ 201 top: $btn.offset().top + $btn.height(), 202 left: $btn.offset().left + $btn.outerWidth() - $menu.width() 203 }); 204 } 205 206 // ãããããã¦ã³ãéã 207 function open() { 208 $("button#SupportNaviSearch.is-open").triggerHandler("click"); 209 $menu.stop(true, true).slideDown(function(){ 210 if ($menu.find(">.Inner").height() > $menu.height() ) { 211 $menu.css("overflow-y", "scroll"); 212 } else { 213 $menu.css("overflow-y", "hidden"); 214 } 215 }); 216 $backdrop.appendTo("body"); 217 $btn.addClass("is-open").attr("aria-expanded", "true"); 218 $btn.attr("aria-expanded", "true"); 219 $("#HeaderArea1").addClass("countrymenu-open"); 220 offset(); 221 } 222 223 // ãããããã¦ã³ãéãã 224 function close() { 225 $backdrop.detach(); 226 $menu.stop(true, true).slideUp(); 227 $btn.removeClass("is-open").attr("aria-expanded", "false"); 228 $("#HeaderArea1").removeClass("countrymenu-open"); 229 } 230 231 // ãã¿ã³ 232 $btn.on("click", function(){ 233 if ($btn.length) { 234 $btn.hasClass("is-open") ? close() : open(); 235 return false; 236 } else { 237 return true; 238 } 239 }); 240 241 // blur 242 $menu.find("a").on("blur", function(){ 243 setTimeout(function(){ 244 if ($menu.find("a").index($(":focus")) == -1) { 245 close(); 246 } 247 },50); 248 }); 249 250 251 // keydownï¼ãã¿ã³ï¼ 252 $btn.on("keydown", function(e){ 253 if (e.keyCode == 13 || e.keyCode == 40) { 254 open(); 255 $menu.find("a:first-child").focus(); 256 return false; 257 } 258 return true; 259 }); 260 261 // keydownï¼ã¡ãã¥ã¼å ï¼ 262 $menu.find("a").on("keydown", function(e){ 263 if (e.keyCode == 38) { 264 const $prev = $(this).prev(); 265 if ($prev.length == 1) { 266 $prev.focus(); 267 } else { 268 $menu.find("a:last-child").focus(); 269 } 270 return false; 271 } 272 if (e.keyCode == 40) { 273 const $next = $(this).next(); 274 if ($next.length == 1) { 275 $next.focus(); 276 } else { 277 $menu.find("a:first-child").focus(); 278 } 279 return false; 280 } 281 if (e.keyCode == 9) { 282 return true; 283 } 284 }); 285 286 const $backdrop = $('<div id="LangBackdrop"></div>'); 287 $backdrop.on("click", close); 288 289 // ãªãµã¤ãº 290 $(window).on("resize.LangMenu", function(){ 291 offset(); 292 if ($.isSM() && $btn.hasClass("is-open")) { 293 close(); 294 } 295 }); 296 297}); 298 299 300 301// ãããããã¦ã³ã¡ãã¥ã¼ 302$(function(){ 303 304 // éã 305 function open($btn) { 306 307 // éãã¦ããã¡ãã¥ã¼ãããã°éãã 308 $(".DropDownMenu>button.is-open").not($btn).each(function(){ 309 $(this).removeClass("is-open");
310 $(this).next("ul").stop(true, true).slideUp(); 311 }); 312 313 $btn.addClass("is-open").attr("aria-expand", "true"); 314 $btn.next("ul").stop(true, true).slideDown(); 315 $backdrop.appendTo("body"); 316 $("#HeaderArea2").addClass("dropdown-open"); 317 } 318 319 320 // éãã 321 function close($btn) { 322 if ($btn == null) { 323 $(".DropDownMenu>button.is-open").each(function(){ 324 $(this).removeClass("is-open"); 325 $(this).next("ul").stop(true, true).slideUp(); 326 }); 327 } else { 328 $btn.removeClass("is-open").attr("aria-expand", "false"); 329 $btn.next("ul").stop(true, true).slideUp(); 330 } 331 $backdrop.detach(); 332 333 $("#HeaderArea2").removeClass("dropdown-open"); 334 } 335 336 337 // ããããã¦ã³ã¡ãã¥ã¼ã®ä½ç½®ã®èª¿æ´ 338 function offset() { 339 $(".DropDownMenu>button.is-open").each(function(){ 340 const $btn = $(this); 341 const $menu = $(this).next("ul"); 342 const $container = $("#HeaderArea2>.Container ,#HeaderArea2>.ContainerFix"); 343 344 if ($btn.offset().left + $menu.width() > $container.offset().left + $container.width()) { 345 $menu.offset({left: $btn.offset().left - $menu.width() + $btn.outerWidth()}); 346 } else { 347 $menu.offset({left: $btn.offset().left}); 348 } 349 }); 350 } 351 352 353 // ã¡ãã¥ã¼ã®ã¯ãªã㯠354 $(".DropDownMenu>button").on("click", function(){ 355 if ($(this).hasClass("is-open")) { 356 close($(this)); 357 } else { 358 open($(this)); 359 offset(); 360 } 361 362 return false; 363 }); 364 365 // keydownï¼ã¡ãã¥ã¼ï¼ 366 $(".DropDownMenu>button").on("keydown", function(e){ 367 if (e.keyCode == 13 || e.keyCode == 40) { 368 if ($(this).hasClass("is-open")) { 369 close($(this)); 370 } else { 371 open($(this)); 372 offset(); 373 $(this).next().find(">li:first-child>*").focus(); 374 } 375 return false; 376 } 377 return true; 378 }); 379 380 // ãµãã¡ãã¥ã¼ã®éé 381 $(".DropDownMenu>ul button").on("click", function(){ 382 383 if ($(this).hasClass("is-open")) { 384 $(this).removeClass("is-open").attr("aria-expanded", "false"); 385 $(this).next("ul").stop(true, true).slideUp(); 386 } else { 387 $(this).addClass("is-open").attr("aria-expanded", "true"); 388 $(this).next("ul").stop(true, true).slideDown(); 389 } 390 return false; 391 }); 392 393 // keydownï¼ã¡ãã¥ã¼å ï¼ 394 $(".DropDownMenu>ul a, .DropDownMenu>ul button").on("keydown", function(e){ 395 if (e.keyCode == 38) { 396 const $list = $(this).closest("ul").children(); 397 var $prev = $(this).parent().prev(); 398 if ($prev.length == 0) { 399 $prev = $list.last(); 400 } 401 $prev.find(">a,>button").focus(); 402 return false; 403 } 404 if (e.keyCode == 40) { 405 const $list = $(this).closest("ul").children(); 406 var $next = $(this).parent().next(); 407 if ($next.length == 0) { 408 $next = $list.first(); 409 } 410 $next.find(">a,>button").focus(); 411 return false; 412 } 413 if (e.keyCode == 39) { 414 const $ul = $(this).next("ul"); 415 if ($ul.length) { 416 $(this).addClass("is-open").attr("aria-expanded", "true"); 417 $ul.stop(true, true).slideDown(); 418 $ul.find(">li:first-child>*").focus(); 419 } 420 return false; 421 } 422 if (e.keyCode == 37) { 423 const $ul = $(this).closest("ul"); 424 $ul.prev("button").focus().removeClass("is-open").attr("aria-expanded", "false"); 425 $ul.stop(true, true).slideUp(); 426 return false; 427 } 428 if (e.keyCode == 9) { 429 return true; 430 } 431 return true; 432 }); 433 434 435 // 鏿ä¸ã®ã¡ãã¥ã¼ãéããç¶æ ã«ãã 436 $(".DropDownMenu>ul li.Current").each(function(){ 437 $(this).parents("ul:not([id^=GlobalNaviMenu])").each(function(){ 438 if (!$(this).parent().hasClass("DropDownMenu")) { 439 $(this).show(); 440 $(this).prev("button").addClass("is-open").attr("aria-expanded", "true"); 441 } 442 }); 443 }); 444 445 // ãã©ã¼ã«ã¹ 446 $(".DropDownMenu>ul a, .DropDownMenu>ul button").on("blur", function(e){ 447 const $menu = $(this).closest(".DropDownMenu").find(">ul"); 448 setTimeout(function(){ 449 if ($menu.find("a,button").index($(":focus")) == -1) { 450 close(); 451 } 452 },50); 453 }); 454 455 // ã¦ã£ã³ãã¦ãªãµã¤ãº 456 $(window).on("resize.DropDownMenu", function(){ 457 458 // ãããããã¦ã³ã¡ãã¥ã¼ã®ä½ç½®ãèª¿æ´ 459 offset(); 460 461 // SPã¢ã¼ãã«ãªã£ããã¡ãã¥ã¼ãéãã 462 if ($.isSM()) { 463 close(); 464 } 465 466 }); 467 468 // backdrop 469 const $backdrop = $('<div id="DropDownBackdrop"></div>'); 470 $backdrop.on("click", function(){ 471 close(null); 472 }); 473 474}); 475 476 477 478// ãããã¼ã¨ãªã¢1åºå® 479$(function(){ 480 481 const $body = $("body"); 482 const $header1 = $("#HeaderArea1"); 483 var scroll = 0; 484 485 if ($("#Popup").length) return; 486 if ($header1.find(">.ContainerFix").length) return; 487 488 // ã¹ã¯ãã¼ã« 489 $(window).on("scroll.Header1", function(){ 490 491 if (!$.isSM()) return; 492 if ($body.hasClass("menu-open")) return; 493 if ($body.hasClass("spsearch-open")) return; 494 495 if ($(window).scrollTop() <= 0) { 496 $body.removeClass("header1-fix header1-transition header1-show"); 497 scroll = 0; 498 return; 499 } 500 501 if ($(window).scrollTop() < $header1.height() ) { 502 return; 503 } 504 505 // ãããã¼ã®åºå® 506 if (!$body.hasClass("header1-fix")) { 507 $body.addClass("header1-fix").ready(function(){ 508 $body.addClass("header1-transition"); 509 }); 510 } 511 512 // ä¸ã¹ã¯ãã¼ã« 513 if ( $(window).scrollTop() <= scroll) { 514 $body.addClass("header1-show"); 515 } else { 516 $body.removeClass("header1-show"); 517 } 518 519 // 横ä½ç½®ã®èª¿æ´ 520 if ($.isSM()) { 521 if ($header1.width() > $(window).width()) { 522 $header1.css({left:0 - $(window).scrollLeft()}); 523 } else { 524 $header1.css({left:0}); 525 } 526 } 527 528 scroll = $(window).scrollTop() 529 530 }); 531 532 // ãªãµã¤ãº 533 $(window).on("resize.HeaderArea1", function(){ 534 if (!$.isSM()) { 535 $body.removeClass("header1-fix header1-transition header1-show"); 536 } 537 }); 538}); 539 540 541// ãããã¼ã¨ãªã¢2åºå® 542$(function(){ 543 544 const $body = $("body"); 545 const $header1 = $("#HeaderArea1"); 546 const $header2 = $("#HeaderArea2"); 547 var scroll = 0; 548 549 if (!$header2.hasClass("Sticky")) return; 550 551 // ã¹ã¯ãã¼ã« 552 $(window).on("scroll.Header2", function(){ 553 554 if ($.isSM()) { 555 if ($header2.find(">.Container").length) return; 556 } 557 558 if ($(window).scrollTop() <= $header1.outerHeight(true)) { 559 $body.css("padding-top", ""); 560 $body.removeClass("header2-fix header2-transition header2-show"); 561 $header2.css({left:0}); 562 scroll = 0; 563 return; 564 } 565 566 if ($(window).scrollTop() < $header1.outerHeight(true) + $header2.height()) { 567 return; 568 } 569 570 if (!$body.hasClass("header2-fix")) { 571 $body.addClass("header2-fix").ready(function(){ 572 $body.addClass("header2-transition"); 573 }); 574 $(".DropDownMenu>button.is-open").triggerHandler("click"); 575 $("button#SupportNaviLang.is-open").triggerHandler("click"); 576 } 577 578 if ($(window).scrollTop() <= scroll) { 579 $body.addClass("header2-show"); 580 } else { 581 $body.removeClass("header2-show"); 582 $(".DropDownMenu>button.is-open").triggerHandler("click") 583 } 584 585 $body.css("padding-top", $header2.height()); 586 587 if ($header2.width() > $(window).width()) { 588 $header2.css({left:0 - $(window).scrollLeft()}); 589 } else { 590 $header2.css({left:0}); 591 } 592 593 scroll = $(window).scrollTop(); 594 }); 595 596 // ãªãµã¤ãº 597 $(window).on("resize.HeaderArea2", function(){ 598 if ($.isSM()) { 599 $body.removeClass("header2-fix header2-transition header2-show"); 600 $body.css("padding-top", ""); 601 $header2.css({left:0}); 602 } 603 }); 604}); 605 606 607// ã¹ããã¡ãã¥ã¼ 608$(function(){ 609 610 611 const $spMenuBtn = $("#SpMenuBtn"); 612 const $pcSupNavi = $("#SupportNavi").clone(); 613 const $pcLangMenu = $("#LangMenu").clone(); 614 const $pcGlobalMenu = $("#GlobalNaviMenu").clone(); 615 const $pcMegaMenu = $("#MegaMenu").clone(); 616 const $pcLocalMenu = $("#HorizontalLocalNavi").clone(); 617 const $spGlobalMenu = ($pcGlobalMenu.length == 1 ? $pcGlobalMenu : $('<ul id="SpGlobalNavi"></ul>')); 618 const $spSupNavi = $('<ul id="SpSupportNavi"></ul>');
619 const $spModal = $('<div id="SpMenuModal" tabindex="-1"><div id="SpMenuModalDialog"><div id="SpMenuModalContent"><div id="SpMenuModalBody"></div></div></div></div>'); 620 621 if ($("#HeaderArea1>.ContainerFix").length > 0) return; 622 if ($spMenuBtn.length == 0) return; 623 624 $spMenuBtn.attr("aria-expanded", "false"); 625 $spMenuBtn.attr("aria-controls", "SpMenuModalDialog"); 626 627 // backdrop 628 const $backdrop = $('<div id="SpMenuModalBackdrop"></div>'); 629 $backdrop.on("transitionend webkitTransitionEnd", function() { 630 if (!$backdrop.hasClass("show")) { 631 $backdrop.detach(); 632 } 633 }); 634 635 // ã¡ãã¥ã¼ãéã 636 function menuOpen() { 637 638 $("button#SupportNaviSearch.is-open").triggerHandler("click"); 639 640 $("html").css("overflow", "hidden"); 641 $("body").addClass("menu-open"); 642 $spMenuBtn.addClass("is-open").attr("aria-expanded", "true"); 643 $backdrop.appendTo("body").ready(function(){ 644 $backdrop.addClass("show"); 645 }); 646 $spModal.show().ready(function(){ 647 $spModal.addClass("show"); 648 }); 649 } 650 651 // ã¡ãã¥ã¼ãéãã 652 function menuClose() { 653 $("body").removeClass("menu-open"); 654 $("html").css("overflow", ""); 655 $backdrop.removeClass("show"); 656 $spModal.removeClass("show"); 657 $spMenuBtn.removeClass("is-open").attr("aria-expanded", "false"); 658 } 659 660 661 // ã¡ãã¥ã¼ãã¿ã³ã®ã¯ãªã㯠662 $spMenuBtn.on("click", function(){ 663 if ($(this).hasClass("is-open")) { 664 menuClose(); 665 } else { 666 menuOpen(); 667 } 668 669 return false 670 }); 671 672 // ãªãµã¤ãº 673 $(window).on("resize.SpMenu", function(){ 674 if (!$.isSM()) { 675 menuClose(); 676 } 677 }); 678 679 // ã¡ãã¥ã¼é ç®ã®éé 680 $(document).on("click", "#SpGlobalNavi button,#SpSupportNavi button", function(){ 681 682 if ($(this).hasClass("is-open")) { 683 $(this).removeClass("is-open").attr("aria-expanded", "false"); 684 $(this).next("ul").stop(true, true).slideUp(); 685 } else { 686 $(this).addClass("is-open").attr("aria-expanded", "true"); 687 $(this).next("ul").stop(true, true).slideDown(); 688 } 689 690 return false; 691 }); 692 693 $spModal.on("click", function(e) { 694 if (e.target === e.currentTarget) { 695 menuClose(); 696 } 697 }); 698 699 // ã¡ãã¥ã¼ã®æ§ç¯ 700 // ã°ãã¼ãã«ãã 701 if ($spGlobalMenu.length == 1) { 702 $spGlobalMenu.attr("id", "SpGlobalNavi"); 703 $spGlobalMenu.find(".DropDownMenu").removeClass("DropDownMenu"); 704 $spGlobalMenu.find(".is-open").removeClass("is-open").next("ul").hide(); 705 $spGlobalMenu.find("button").each(function(){ 706 const aria = $(this).attr("aria-controls"); 707 const $ul = $(this).next("ul"); 708 const id = $ul.attr("id"); 709 if (aria) { 710 $(this).attr("aria-controls", "__SpMenu"+aria); 711 $ul.attr("id", "__SpMenu"+$ul.attr("ids")); 712 } 713 if (id) { 714 $(this).attr("aria-controls", "__SpMenu"+aria); 715 $ul.attr("id", "__SpMenu"+id); 716 } 717 }); 718 719 } 720 721 // 横åãã¼ã«ã«ãã 722 $pcLocalMenu.attr("id", ""); 723 if ($pcLocalMenu.length) { 724 $spGlobalMenu.find(">.Current").each(function(){ 725 $(this).append($pcLocalMenu.clone().css("display", "block")); 726 }); 727 } 728 729 // ã¡ã¬ã¡ãã¥ã¼ 730 $pcMegaMenu.find(".MMGlobalNaviStyle").each(function(){ 731 const $li = $("<li></li>"); 732 if ($(this).hasClass("Current")) { 733 $li.addClass("Current"); 734 } 735 $li.append($(this).find("a")); 736 $spGlobalMenu.append($li); 737 }); 738 739 740 // ãµãã¼ãã¡ãã¥ã¼ 741 $pcSupNavi.find(">a:not(#SupportNaviSearch),>button:not(#SupportNaviSearch)").each(function(){ 742 const $li = $("<li></li>"); 743 if ($(this).prop("tagName").toLowerCase() == "button" && $(this).attr("id") == "SupportNaviLang") { 744 const $ul = $("<ul></ul>"); 745 const $btn = $("<button><span></span></button>"); 746 const aria = $(this).attr("aria-controls"); 747 $pcLangMenu.find("a").each(function(){ 748 $ul.append($('<li></li>').append($(this))); 749 }); 750 if ($(this).find("img").length) { 751 $(this).find("img").attr("alt", null); 752 $btn.find(">span").append($("<span class='Icon'></span>").append($(this).find("img"))); 753 } 754 $btn.find(">span").append($(this).find(">span>span")); 755 if (aria) { 756 $ul.attr("id", "__SpMenu"+aria); 757 $btn.attr("aria-controls" , "__SpMenu"+aria); 758 $btn.attr("aria-expanded" , "false"); 759 } 760 $li.append($btn).append($ul); 761 $spSupNavi.append($li); 762 } else if ($(this).prop("tagName").toLowerCase() == "a") { 763 const $item = $(this).clone(); 764 if ($item.find("img").length) { 765 $item.find("img").attr("alt", null); 766 $item.prepend("<span class='Icon'></span>"); 767 $item.find("span.Icon").append($item.find("img")); 768 } 769 $li.append($item); 770 $spSupNavi.append($li); 771 } 772 }); 773 774 // ã¡ãã¥ã¼ã追å 775 $spModal.find("#SpMenuModalBody").append($spGlobalMenu); 776 $spModal.find("#SpMenuModalBody").append($spSupNavi); 777 $("#HeaderArea1").after($spModal); 778 779 $spModal.on("transitionend webkitTransitionEnd", function() {
780 if (!$spModal.hasClass("show")) { 781 $spModal.hide(); 782 } 783 }); 784}); 785 786// ãã¼ã¸ããã㸠787$(function(){ 788 789 $("#FooterPageTop").off("click"); 790 $("#FooterPageTop").on("click", function(){ 791 var topID = (ua("safari")) ? "html,body" : "html"; 792 var link = $(this).attr("href"); 793 if(link.charAt(0)=="#" && link.charAt(1)!="") { 794 setTimeout(function() { 795 $(topID).stop().animate({scrollTop: 0}, 800, "easeInOutCubic", function() { 796 location.href = link; 797 }); 798 }, 50); 799 return false; 800 } 801 return false; 802 }); 803 804 805 // FatMenuãããå ´åãä½ç½®ã®èª¿æ´ 806 function offset() { 807 var $prev = $("#FooterArea").prev(); 808 var $target = null; 809 while(true) { 810 if (!($prev.hasClass("FatMenu") || $prev.hasClass("FatMenuWide") || $prev.hasClass("FatBanner"))) { 811 break; 812 } 813 if ($prev.is(":visible")) { 814 $target = $prev; 815 } 816 $prev = $prev.prev(); 817 } 818 if ($target != null) { 819 $("#FooterPageTop").offset({top:$target.offset().top - $("#FooterPageTop").height()}); 820 } else { 821 $("#FooterPageTop").css("top", ""); 822 } 823 } 824 825 if ($("#FooterArea").prevAll(".FatMenu,.FatMenuWide,.FatBanner").length > 0) { 826 $(window).on("resize.FooterPageTop", offset); 827 offset(); 828 } 829 830 831}); 832 833 834// ã¬ã¹ãã³ã·ããã¼ãã« 835$(function(){ 836 837 $(".ResponsiveTableWindow").remove(); 838 $(".LinkSet a").off("click"); 839 840 var android4 = navigator.userAgent.indexOf("Android 4") !== -1; // for Android 4.x 841 var contents = "#top, #SiteIdentity, #SiteIdentityS, #SiteIdentityL, #GlobalNavi, #TopicPath, #Contents, .Contents, .FatBanner, .FatMenu, .FatMenuWide, #Footer, #PageTopBottom, #HeaderArea1, #HeaderArea2, #FooterArea, #HorizontalLocalNaviArea"; 842 var topID = (ua("safari")) ? "body" : "html"; 843 var scrolltop = 0; 844 var label = "Close"; 845 846 if ($("html").attr("lang") == "ja") label = "éãã"; 847 if ($("html").attr("lang") == "zh-cn") label = "\u5173\u95ed"; 848
849 $(".ResponsiveTableStyle2, .ResponsiveTableStyle3").each(function() { 850 var grid = $(this).parent(".Grid4")[0] ? "Contents965" : "Contents720"; 851 var tag = '<div class="ResponsiveTableWindow">'; 852 tag += '<div class="ResponsiveTableHeaderArea">'; 853 tag += '<div class="ResponsiveTableStatement">' + $("#Statement").html() + '</div>'; 854 tag += '<button type="button" class="ResponsiveTableCloseBtn" aria-label="' + label + '"></button>'; 855 tag += '</div>'; 856 tag += android4 ? '<div class="ResponsiveTableContainer">' : ''; // for Android 4.x 857 tag += '<div class="' + grid + '">'; 858 tag += $(this).find(".TableSet").html(); 859 tag += '</div>'; 860 tag += android4 ? '</div>' : ''; // for Android 4.x 861 tag += '</div>'; 862 $("body").append(tag); 863 }); 864 865 $(".LinkSet a").on("click", function() { 866 scrolltop = $(topID).scrollTop(); 867 var index = $(".LinkSet a").index(this); 868 $("html").addClass("ResponsiveTableWindowOpen"); 869 $(contents + ", #HeaderArea").hide(); 870 $(".ResponsiveTableWindow").eq(index).show(); 871 $(topID).scrollTop(0); 872 }); 873 874 $(".ResponsiveTableCloseBtn").on("click", function() { 875 var index = $(".ResponsiveTableCloseBtn").index(this); 876 $("html").removeClass("ResponsiveTableWindowOpen"); 877 $(contents).removeAttr("style"); 878 $("#HeaderArea").show(); 879 $(".ResponsiveTableWindow").eq(index).removeAttr("style"); 880 $(topID).scrollTop(scrolltop); 881 }); 882 883}); 884
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.