1"use strict"; 2 3 4document.addEventListener('DOMContentLoaded', () =>{ 5 var winW = $(window).width(); 6 var devW = 799; 7 if (winW <= devW) { //ã¹ãã 8 9 //ãã³ãã¼ã¬ã¼ 10 $('.l-header__btn').off('click'); 11 $('.l-header__btn').on('click', function(){ 12 $(this).toggleClass('is-open'); 13 $('.sp-nav').slideToggle(400); 14 $("body").toggleClass("fixed"); 15 return false; 16 }); 17 18 } else { //PC 19 20 } 21}); 22 23 24 25$(function () { 26 //MV 27 $(".slider").slick({ 28 arrows: false, 29 autoplay: true, 30 adaptiveHeight: true, 31 centerMode: true, 32 centerPadding: "10%", 33 dots: true, 34 appendDots: $('.dots'), 35 responsive: [ 36 { 37 breakpoint: 799, 38 settings: { 39 arrows: false, 40 centerMode: false, 41 centerPadding: "0", 42 }, 43 }, 44 ], 45 }); 46 47 //ã¯ãªãã¯ã§è¡¨ç¤º 48 $('.lang').click(function() { 49 $('.lang-box').toggle(); 50 }) 51 52 //ã¹ã¯ãã¼ã« 53 $('a[href^="#"]').click(function(){ 54 var speed = 500; 55 var href= $(this).attr("href"); 56 var target = $(href == "#" || href == "" ? 'html' : href); 57 var position = target.offset().top; 58 $("html, body").animate({scrollTop:position}, speed, "swing"); 59 return false; 60 }); 61 62}); 63 64 65 66 67//modal 68const modalBtns = document.querySelectorAll(".modal-toggle"); 69modalBtns.forEach(function (btn) { 70 btn.onclick = function () { 71 var modal = btn.getAttribute('data-modal'); 72 document.getElementById(modal).style.display = "block"; 73 }; 74}); 75const closeBtns = document.querySelectorAll(".modal-close"); 76closeBtns.forEach(function (btn) { 77 btn.onclick = function () { 78 var modal = btn.closest('.modal'); 79 modal.style.display = "none"; 80 }; 81}); 82 83window.onclick = function (event) { 84 if (event.target.className === "modal") { 85 event.target.style.display = "none"; 86 } 87}; 88 89 90 91// clipboard copy 92(function () { 93 let i = 0; 94 let el = {}; 95 96 document.addEventListener('DOMContentLoaded', function () { 97 // åã»ã¬ã¯ã¿ã®æå® 98 el.clipboardButton = document.querySelectorAll('.js-clipboard-button'); 99 el.clipboardText = document.querySelectorAll('.js-clipboard-text'); 100 el.clipboardChangeText = document.querySelectorAll('.js-clipboard-text-change'); 101 102 // ã³ãã¼å®äºæã®å種æå® 103 el.textChangeFlag = true; // true or false 104 el.textChangeClass = 'is-text-change'; 105 el.completionText = 'copied'; 106 el.textReturnToInitialFlag = true; // ï¼æ»ãï¼trueãæ»ããªãï¼falseï¼ 107 el.textChangeDelay = 1000; 108 109 // ã¯ãªãããã¼ãã³ãã¼ãã¿ã³ã®ã¤ãã³ãå¦ç 110 for (i = 0; i < el.clipboardButton.length; ++i) { 111 el.clipboardButton[i].addEventListener('click', { 112 // 弿°ã¨é¢æ°ããªãã¸ã§ã¯ãã«ãã¦æ¸¡ã 113 targetIndex: i, // ç¾å¨ã®è©²å½è¦ç´ ãä½çªç®ãã®æ å ±ãæå® 114 textChangeFlag: el.textChangeFlag, // ã³ãã¼å®äºå¾ããã¹ãã«æ¸ãæããæå® 115 textReturnToInitialFlag: el.textReturnToInitialFlag, // ä¸å®æéå¾ã«æ¸ãæãåã®ç¶æ ã«æ»ããæå® 116 handleEvent: el.clipBoardCopyFnc // å®è¡ãã颿°ãæå® 117 }); 118 } 119 }, false); 120 121 // ã¯ãªãããã¼ãã³ãã¼ç¨é¢æ° 122 el.clipBoardCopyFnc = function () { 123 if (el.activeFlag === true) { 124 return; 125 } 126 127 el.activeFlag = true; 128 el.targetIndex = this.targetIndex; 129 el.clipboardTarget = el.clipboardText[el.targetIndex].textContent; // ã³ãã¼å¯¾è±¡ã®ããã¹ããåå¾ 130 el.currentChangeText = el.clipboardChangeText[el.targetIndex].textContent; // ã³ãã¼å®äºå¾ããã¹ãã«æ¸ãæãåã®ããã¹ããåå¾ 131 132 // ã¯ãªãããã¼ãã«è©²å½ããã¹ããã³ãã¼ 133 if (navigator.clipboard == undefined) { 134 window.clipboardData.setData('Text', el.clipboardTarget); // IE âããããã¨ã©ã¼ã¨ãªã 135 } else { 136 navigator.clipboard.writeText(el.clipboardTarget); // IEä»¥å¤ 137 } 138 139 // ã³ãã¼å®äºå¾ããã¹ãã«æ¸ãæããã©ã°ããæ¸ãæããï¼trueããå¤å® 140 if (this.textChangeFlag) { 141 el.clipboardChangeText[el.targetIndex].classList.add(el.textChangeClass); 142 el.clipboardChangeText[el.targetIndex].textContent = el.completionText; 143 } 144 145 // å種ãã©ã°ããæ¸ãæããï¼trueãããã³ãæ»ãï¼trueããå¤å® 146 if (this.textChangeFlag && this.textReturnToInitialFlag) { 147 setTimeout(function () { 148 el.clipboardChangeText[el.targetIndex].classList.remove(el.textChangeClass); 149 el.clipboardChangeText[el.targetIndex].textContent = el.currentChangeText; 150 el.activeFlag = false; 151 }, el.textChangeDelay); 152 } else { 153 setTimeout(function () { 154 el.activeFlag = false; 155 }, el.textChangeDelay); 156 } 157 } 158}()); 159 160 161
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.