1const PC_FIXED = false; 2const SP_FIXED = true; 3const SP_WIDTH = 769; 4const SPEED = 500; 5 6// 1. ã¹ã¯ãã¼ã«é¢é£ 7 8function scrollPosition(position) { 9 let offsetFromTop = $("header"); 10 position -= 11 (PC_FIXED && $(window).innerWidth() >= SP_WIDTH) || 12 (SP_FIXED && $(window).innerWidth() < SP_WIDTH) 13 ? offsetFromTop.innerHeight() 14 : 0; 15 $("html, body").animate( 16 { 17 scrollTop: position, 18 }, 19 SPEED 20 ); 21} 22 23$(function () { 24 let body = $(document.body); 25 let menu_open = false; 26 let menu_btn = $(".slidemenu-btn"); 27 // let menu_img = $(".slidemenu-btn").find('img'); // ç»åã®ã¹ã©ã¤ãã¡ãã¥ã¼ãã¿ã³ 28 // let menu_txt = $(".slidemenu-btn").find('.ttl'); // ããã¹ãã®ã¹ã©ã¤ãã¡ãã¥ã¼ãã¿ã³ 29 30 function slidemenuOpen() { 31 // $(menu_img).attr("src", $(menu_img).attr("src").replace("menu", "close")); 32 // $(menu_txt).text("close"); 33 menu_btn.addClass("active"); 34 body.addClass("open"); 35 body.removeAttr("style"); 36 menu_open = true; 37 } 38 39 function slidemenuClose() { 40 // $(menu_img).attr("src", $(menu_img).attr("src").replace("close", "menu")); 41 // $(menu_txt).text("menu"); 42 menu_btn.removeClass("active"); 43 body.removeClass("open"); 44 body.removeAttr("style"); 45 if (top != 0) { 46 // ãã¼ã¸å ã¹ã¯ãã¼ã«ã®ãã 47 $(window).scrollTop(top); 48 top = 0; //ãªã»ãã 49 } 50 menu_open = false; 51 } 52 53 // <a href="#top">ã®æ§ã«è¨è¿°ããã¨æ»ããã«ã¹ã¯ãã¼ã«ããã 54 $('a[href*="#"]').on("click", function (e) { 55 let current = location.pathname; 56 let full_current = location.origin + current; 57 let link = $(this).attr("href").split("#")[0]; 58 // ããããã¼ã¸åã³ã«ãã´ãªãããã®å ´åã¯ããã¹ã¦index.htmlããã¨ãã¦å¤å®ãã 59 // aã¿ã°ã¯@link()#00 or #00ã§æå®ãããã¨ï¼aaa.html#00ã¯åãã¾ããï¼ 60 if (link != "") { 61 if (link.indexOf(".html") == -1) { 62 if (link.slice(-1) == "/") { 63 link += "index.html"; 64 } else { 65 link += "/index.html"; 66 } 67 } 68 if (full_current.indexOf(".html") == -1) { 69 if (full_current.slice(-1) == "/") { 70 full_current += "index.html"; 71 } else { 72 full_current += "/index.html"; 73 } 74 } 75 } 76 77 if (current === link || full_current === link || link == "") { 78 if ($(this).attr("data-href")) { 79 // tabjsã¨ã®ç«¶ååé¿ 80 return false; 81 } else { 82 e.preventDefault(); 83 slidemenuClose(); 84 let position = $(this.hash).length > 0 ? $(this.hash).offset().top : 0; 85 scrollPosition(position); 86 } 87 } 88 }); 89 90 // ã¹ã©ã¤ãã¡ãã¥ã¼ã®éé 91 let top = 0; 92 menu_btn.on("click", function () { 93 if (!menu_open) { 94 top = $(window).scrollTop(); 95 } 96 if (body.hasClass("open")) { 97 slidemenuClose(); 98 } else { 99 slidemenuOpen(); 100 body.css({ 101 height: window.innerHeight, 102 top: -top, 103 }); 104 } 105 }); 106 // PCæoverlayãè¨ç½®ããå ´å 107 // $("#overlay").on("click", function () { 108 // slidemenuClose(); 109 // }); 110}); 111 112// ä¸å®éã¹ã¯ãã¼ã«ããã¨ãã¼ã¸ãããã«æ»ãã表示ãããï¼å ´æçã®æå®ã¯common.scssã«ã¦ï¼ 113$(function () { 114 let top_btn = $(".pagetop"); 115 top_btn.hide(); 116 $(window).scroll(function () { 117 $(this).scrollTop() > 100 ? top_btn.fadeIn() : top_btn.fadeOut(); 118 }); 119 120 top_btn.click(function () { 121 scrollPosition(0); 122 return false; 123 }); 124 125 // 1.5ç§ã§è¡¨ç¤ºæ¶ã 126 if ($(window).innerWidth() < SP_WIDTH) { 127 var scrollStopEvent = new $.Event("scrollstop"); 128 var delay = 1500; 129 var timer; 130 function scrollStopEventTrigger() { 131 if (timer) { 132 clearTimeout(timer); 133 } 134 timer = setTimeout(function () { 135 top_btn.fadeOut(); 136 $(window).trigger(scrollStopEvent); 137 }, delay); 138 } 139 $(window).on("scroll", scrollStopEventTrigger); 140 } 141}); 142 143// ã¢ã³ã«ã¼ãªã³ã¯ä»ãã®ãã¼ã¸é·ç§»ãããã¨ãï¼ãããã¼ãåºå®å調æ´ããjs 144$(window).on("load", function () { 145 if (location.hash != "" && $(location.hash).length > 0) { 146 if ( 147 (PC_FIXED && $(window).innerWidth() >= SP_WIDTH) || 148 (SP_FIXED && $(window).innerWidth() < SP_WIDTH) 149 ) { 150 let pos = $(location.hash).offset().top - $("header").innerHeight(); 151 $("html, body").animate( 152 { 153 scrollTop: pos, 154 }, 155 1, 156 "swing" 157 ); 158 } else { 159 return false;
160 } 161 } 162}); 163 164// 2. rolloverï¼_offã¨æ«å°¾ã«ã¤ããç»åããªã³ãã¦ã¹ã§_onã¨ã¤ããç»åã«åãæ¿ããï¼ 165$(function () { 166 $("img").hover( 167 function () { 168 $(this).attr("src", $(this).attr("src").replace("_off.", "_on.")); 169 }, 170 function () { 171 $(this).attr("src", $(this).attr("src").replace("_on.", "_off.")); 172 } 173 ); 174}); 175 176// 3. æ¨ªå¹ 375px以ä¸ã®viewportã®è¨å® 177new ViewportExtra(375); 178 179document.addEventListener("DOMContentLoaded", function () { 180 // ã¿ãã¬ãã端æ«ãã©ãããå¤å® 181 var ua = navigator.userAgent.toLowerCase(); 182 var isSmartPhone = 183 ua.indexOf("iphone") > -1 || 184 (ua.indexOf("android") > -1 && ua.indexOf("mobile") > -1); 185 var isTablet = 186 !isSmartPhone && 187 (ua.indexOf("ipad") > -1 || 188 (ua.indexOf("android") > -1 && ua.indexOf("mobile") === -1) || 189 (ua.indexOf("macintosh") > -1 && "ontouchend" in document)); 190 191 // ã¿ãã¬ãã端æ«ã§ã®ã¿æå°å¹ ãè¨å® 192 if (isTablet) { 193 ViewportExtra.setContent({ minWidth: 1340 }); 194 } 195}); 196 197// 4. httpãå«ã¾ããå ´åã«wordbreakãä»ä¸ããjs 198// ç´ä¸ã®ããã¹ãã®ã¿ãåå¾ãããã©ã°ã¤ã³ 199$.fn.textNodeText = function () { 200 let result = ""; 201 $(this) 202 .contents() 203 .each(function () { 204 if (this.nodeType === 3 && this.data) { 205 result += jQuery.trim($(this).text()); 206 } 207 }); 208 return result; 209}; 210//httpãå«ã¾ããå ´åã«wordbreakãä»ä¸ 211$(function () { 212 $("*").each(function () { 213 let http = $(this).textNodeText(); 214 if (http.match(/http/)) { 215 $(this).css("word-break", "break-all"); 216 } 217 }); 218}); 219 220// 5. youtubeã®èªåã¬ã¹ãã³ã·ãå¯¾å¿ 221// iframeã¿ã°ã®è¦ªè¦ç´ ã«ãdivã¿ã°ã追å ããã 222$(function () { 223 $('iframe[src*="youtube"]').wrap('<div class="youtube-wrap"></div>'); 224}); 225 226// ------------------------------------------------------------ 227// 追å åãããã 228// ã¹ã©ã¤ãã¡ãã¥ã¼ã«é¢ãã¦ã¯ãslidemenuOpen/slidemenuCloseã¸è¨è¼ãã 229// ------------------------------------------------------------ 230 231$(function () { 232 $(".tab-list, .tab-list02").tab(); 233 $(".mh").matchHeight(); 234 $(".accordion").accordion(); 235 236 // SNSãªã¹ãããã¼ã¢ãã¡ã¼ã·ã§ã³ 237 $(".sns-list a") 238 .mouseenter(function () { 239 $(this).addClass("fa-beat"); 240 }) 241 .mouseleave(function () { 242 $(this).removeClass("fa-beat"); 243 }); 244 245 // FAQéé 246 $(".acc-ttl").on("click", function () { 247 $(this).next(".acc-txt").slideToggle(); 248 $(this).toggleClass("active"); 249 $(this).closest("li").toggleClass("open"); 250 }); 251}); 252let detachedHeaderTab = null; // â äºåã«å®£è¨ï¼nullã§åæåï¼ 253let detachedSearchTab = null; 254 255// ãããã¼ãã 256$(document).ready(function () { 257 if ($(".h-navlist02-sub").css("opacity") == 1) { 258 $(".h-navlist02-sub").siblings("p").addClass("active"); 259 } 260 261 // .h-navlist02-subã®transitionãçµãã£ãæã®å¦ç 262 $(".h-navlist02-sub").on( 263 "transitionend webkitTransitionEnd oTransitionEnd", 264 function () { 265 // éæåº¦ã0ãªãactiveã¯ã©ã¹ãåé¤ãéæåº¦ã1ãªãactiveã¯ã©ã¹ã追å 266 if ($(this).css("opacity") == 0) { 267 $(this).siblings("p").removeClass("active"); 268 } else { 269 $(this).siblings("p").addClass("active"); 270 } 271 } 272 ); 273 274 // TABã®èª¿æ´ï¼ãããã¼ããã¼ã¸ãæ¢ããã¹ã©ã¤ãã¡ãã¥ã¼ï¼ 275 let headerTab = $("header .nav-tab-box"); 276 let headerTabTarget = $("header .show-tab-content"); 277 278 let searchTab = $(".search-sec .nav-tab-box"); 279 let searchTabarget = $(".search-sec .show-tab-content"); 280 281 $(".common-search-btn").on("click", function () { 282 if ($(this).hasClass("close")) { 283 // detachedHeaderTab ãåå¨ããå ´åã®ã¿ appendTo ãå®è¡ 284 if (detachedHeaderTab) { 285 detachedHeaderTab.appendTo(headerTabTarget); 286 detachedHeaderTab = null; // ç¶æ ãæ»ã 287 } 288 } else { 289 detachedHeaderTab = headerTab.detach(); 290 setTimeout(function () { 291 $(".search-body .tab-list02 li a").first().click(); 292 }, 500); 293 } 294 }); 295 296 $(document).ready(function () { 297 if ($(window).width() <= 768) { 298 detachedHeaderTab = headerTab.detach(); 299 detachedSearchTab = searchTab.detach(); 300 301 setTimeout(function () { 302 $(".slide-menu .tab-list02 li a").first().click(); 303 }, 500); 304 } else { 305 if (detachedHeaderTab) { 306 detachedHeaderTab.appendTo(headerTabTarget); 307 detachedHeaderTab = null; 308 } 309 if (detachedSearchTab) { 310 detachedSearchTab.appendTo(searchTabarget); 311 detachedSearchTab = null; 312 } 313 } 314 }); 315}); 316 317// ãã¼ã¸ãæ¢ã éé 318$(function () { 319 const searchBtn = $(".common-search-btn"); 320 const searchContent = $(".common-search-area"); 321 322 searchBtn.on("click", function () { 323 searchContent.toggleClass("show"); 324 searchBtn.toggleClass("close"); 325 if (searchContent.hasClass("show")) { 326 searchBtn.text(""); 327 searchBtn.html('<i class="fa-solid fa-xmark"></i>éãã'); 328 } else { 329 searchBtn.html('<i class="fa-solid fa-list-ul"></i>ãã¼ã¸ãæ¢ã'); 330 } 331 $("body").toggleClass("lock"); 332 }); 333});
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.