1// ----------------------------------------------------------------------- 2// ã¢ã³ã«ã¼ä»ã®å¤é¨ãªã³ã¯ãã¯ãªãã¯ããéã«è¡¨ç¤ºä½ç½®ãåããªãç¾è±¡ã対å¿(çºçæ¡ä»¶ã¯ä¸è¨) 3// 4// ãçºçæ¡ä»¶ã 5//ãã¢ã³ã«ã¼ãªã³ã¯å ãåæè¡¨ç¤ºã¿ãã§ã¯ãªãéè¡¨ç¤ºç¶æ ã®ã¿ãï¼å³ã®ã¿ãï¼å ã«ã¢ã³ã«ã¼ãè¨ç½®ããã¦ãã 6//ãã¢ã³ã«ã¼å ããä¸ã«slickã®ã«ã«ã¼ã»ã«ãªã©jsã§ä½ã£ã¦ããåçã³ã³ãã³ãããã 7// ä¾ â https://kabu.com/item/foreign_stock/us_stock/default.html#anc03 8// 9// ãåå ã 10// slickãªã©ã¯é表示ãã表示ããã¦ããã«ã«ã¼ã»ã«ã使ããã 11// å¤é¨ãªã³ã¯ã§ã¢ã³ã«ã¼å ã«é£ã¶ã¨ããã«è©²å½ç®æã«é£ã¶ãããã®å¾ã¢ã³ã«ã¼å ã®ä¸é¨ã§ã«ã«ã¼ã»ã«ã使ããã表示ä½ç½®ãä¸ã«ããã¦ãã¾ãã 12// 13// ã対å¦ã 14// å¤é¨ãªã³ã¯ã®ã¢ã³ã«ã¼ä»ãã§ã¦ãã®ãµã¤ãã«å ¥ã£ã¦ããå ´åã âã§ããã ãæ©ãæ®µéâ ã§URLãã䏿¦ã¢ã³ã«ã¼ãå¤ãå¦çããã¦ãã¢ã³ã«å ã«ç§»åããªãããã«ãã¦ã 15// ãã®å¾ãslickã表示ããããURLã«ã¢ã³ã«ã¼ãå度ä»ä¸ãã該å½ç®æã¾ã§ãã©ãããã 16// 17// è£è¶³ï¼æ»ã/é²ãï¼back/forwardï¼ã®å ´åã¯ä»å ¥ããªã 18// è£è¶³ï¼slickãç¡ããã¼ã¸ã§ã¯å³ã¹ã¯ãã¼ã«ã«åå² 19// è£è¶³ï¼ããã·ã¥å¤ï¼ã¢ã³ã«ã¼ï¼ãç¡ããã°ä½ãããªãã 20// ----------------------------------------------------------------------- 21 22(function(){ 23 if (!location.hash) return; 24 // æ»ã/é²ãã®ã¹ã¯ãã¼ã«å¾©å ã¯å°é 25 var n = (performance.getEntriesByType && performance.getEntriesByType('navigation'))?.[0]; 26 if (n && n.type === 'back_forward') return; 27 28 // éé¿ãã¦ããã·ã¥ã䏿¦å¤ãï¼èªåã¹ã¯ãã¼ã«é²æ¢ï¼ 29 try { 30 sessionStorage.setItem('deferredHash', location.hash); 31 history.replaceState(null, '', location.pathname + location.search); 32 // 念ã®ããå³åº§ã«ããã㸠33 document.documentElement.style.scrollBehavior = 'auto'; 34 scrollTo(0, 0); 35 } catch(e){} 36})(); 37 38(function(){ 39 var h = sessionStorage.getItem('deferredHash'); 40 if (!h) return; 41 sessionStorage.removeItem('deferredHash'); 42 43 function doScroll($t){ 44 if (typeof updateHeaderHeight === 'function') updateHeaderHeight();//ãupdateHeaderHeightã¨ãã颿°ãåå¨ããæã ãå¼ã³åºããããã®å®å ¨ãªã¬ã¼ã 45 46 // PCå¹ (>=769px)ã®ã¨ãã ã追å ã§å¼ããã¯ã»ã«æ°ï¼èª¿æ´ç¨ï¼ 47 // æ£ã®å¤ã«ããã¨ãããå°ãä¸ãã«æ¢ã¾ãã¾ããä¾: 12, 16 ãªã© 48 var DESKTOP_EXTRA_OFFSET_PX =70; 49 50 51 //ããã¾ã®ç»é¢å¹ ãPCå¹ ãã©ããããçå½å¤ã§å¤å®ãã¦ãisDesktopã«å ¥ãã¦ãã¾ãã 52 //769px以ä¸ãªãtrueã768px以ä¸ãªãfalseã 53 var isDesktop = window.matchMedia 54 ? window.matchMedia('(min-width: 769px)').matches 55 : (window.innerWidth >= 769); 56 57 var baseTop = $t.offset().top - (window.headerHeight || 0) - (window.adjustmentHeight || 0); 58 var top = baseTop - (isDesktop ? DESKTOP_EXTRA_OFFSET_PX : 0); 59 60 $('html, body').stop(true).animate({ 61 scrollTop: Math.max(0, Math.round(top)) 62 }, window.anchorScrollSpeed || 500); 63 64 // URLã«ããã·ã¥ãæ»ãï¼hashchangeãçºç«ãããããªãå ´åã¯replaceStateï¼ 65 history.replaceState(null, '', location.pathname + location.search + h); 66 } 67 68 window.addEventListener('load', function(){ 69 var id = decodeURIComponent(h.slice(1)); 70 var $t = $('#' + id); 71 if (!$t.length) $t = $('[name="'+id+'"]'); 72 if (!$t.length) return; 73 74 // ã¿ãå ãªã表示ãã¦ãã 75 var $scope = $(document); 76 if ($t.closest('.tab-content').length){ 77 var $tabBody = $t.closest('.tab-body'); 78 var $tabHeader = $tabBody.siblings('.tab-header'); 79 var targetId = $t.closest('.tab-content').data('content-id'); 80 $tabHeader.find('.tab').removeClass('active'); 81 $tabHeader.find('[data-target="'+targetId+'"]').addClass('active'); 82 $tabBody.children('.tab-content').hide(); 83 var $shown = $tabBody.children('[data-content-id="'+targetId+'"]').show(); 84 $scope = $shown; 85 } 86 87 // ã«ã«ã¼ã»ã«æç¡ã§åå² 88 var sel = '.carousel-primary, .carousel-2slides, .carousel-3slides, .carousel-4slides, .carousel-video, .carousel-group-service, .carousel-step, .carousel-flow, .carousel-sp-normal-scroll'; 89 var $cars = $scope.find(sel).filter('.slick-initialized'); 90 91 if (!$cars.length){ 92 doScroll($t); // ã«ã«ã¼ã»ã«ãç¡ããã°å³ã¹ã¯ãã¼ã« 93 return; 94 } 95 96 // ã«ã«ã¼ã»ã«ãããå ´åã¯refresh/setPositionå®äºãå¾ ã£ã¦ããã¹ã¯ãã¼ã«ï¼ä
96¿éºã¿ã¤ã ã¢ã¦ãä»ãï¼ 97 var remaining = $cars.length, finished = false; 98 var timer = setTimeout(function(){ if (!finished){ finished = true; doScroll($t); } }, 600); 99 100 function oneDone(){ 101 if (finished) return; 102 if (--remaining <= 0){ 103 finished = true; 104 clearTimeout(timer); 105 doScroll($t); 106 } 107 } 108 109 $cars.each(function(){ 110 var $s = $(this); 111 $s.one('setPosition.anchorFix reInit.anchorFix', oneDone); 112 try { $s.slick('refresh'); } 113 catch(e){ 114 try { $s.slick('setPosition'); } catch(_){} 115 try { $s.slick('resize'); } catch(_){} 116 // ã¤ãã³ããæ¥ãªãå ´åã¯ä¸ã®ã¿ã¤ã ã¢ã¦ãã§ä¿éº 117 } 118 }); 119 }); 120})(); 121 122 123 124// ----------------------------------------------------------------------- 125// æ¢åãã¼ã¸ã®ã¢ã³ã«ã¼å¦çã¨å§å©ãããã 126// common.js ããã¢ã³ã«ã¼ã«é¢ä¿ããå¦çï¼ã¢ã³ã«ã¼ã¨ã¿ãï¼ãåé¢ãã 127// ----------------------------------------------------------------------- 128 129// ã¢ã³ã«ã¼ãªã³ã¯æ¼ä¸æã®ã¹ã¯ãã¼ã«ã¹ãã¼ã 130var anchorScrollSpeed = 500; 131// ãããã®é«ã 132var headerHeight = 0; 133// ããã³ 134var adjustmentHeight = 16; 135 136// ãããã®é«ããåå¾ãã 137// ----------------------------------------------------------------------- 138 139function updateHeaderHeight() { 140 var $header = $(".header"); 141 headerHeight = $header.length ? $header.outerHeight() : 0; 142} 143 144$(function () { 145 // åæãã¼ã¸èªã¿è¾¼ã¿æã«é«ããåå¾ 146 updateHeaderHeight(); 147 148 // ãã©ã¦ã¶ã®æ¨ªå¹ ã夿´ãããã¨ãã«é«ããååå¾ 149 $(window).on("resize", function () { 150 updateHeaderHeight(); 151 }); 152}); 153 154// ã¢ã³ã«ã¼å ã¿ãã§é ãã¦ããå ´åã®å¦çãâ»ã¢ã³ã«ã¼å ãé表示ã§ã¯ã¢ã³ã«ã¼ãªã³ã¯ã¯æ©è½ããªããã 155// ã¢ã³ã«ã¼å ã¿ãã§ã«ã«ã¼ã»ã«ãããã¨ããã®ã¾ã¾ã§ã¯ã«ã«ã¼ã»ã«ã縦é·ã«ãªã£ã¦ãã¾ãã®ã§slickããªãã¬ãã·ã¥ãã¦æ£ããé«ããåå¾ãã¦ã¹ã¯ãã¼ã«ããããã«ãã¦ãã 156// ----------------------------------------------------------------------- 157$(document).ready(function() { 158 // ID 'if-anchorHideTab' ãHTMLã«åå¨ãããç¢ºèª 159 if ($('#if-anchorHideTab').length > 0) { 160 // åå¨ããå ´åã®ã¿ã以ä¸ã®å¦çãå®è¡ 161 $('.btn-anchor').on('click', function(event) { 162 var targetId = $(this).attr('href'); // ã¯ãªãã¯ãããªã³ã¯ã® href ãåå¾ 163 var $targetElement = $(targetId); 164 // ã¿ã¼ã²ããè¦ç´ ã表示ããã¦ããããå¤å® 165 if (!$targetElement.is(':visible')) { 166 event.preventDefault(); // ããã©ã«ãã®ã¢ã³ã«ã¼ãªã³ã¯ã®åä½ã鲿¢ 167 168 // ãããã®é«ããååå¾ï¼é¢æ°ãããã¨ãã¦æ³å®ï¼ 169 updateHeaderHeight(); 170 var $parentTabContainer = $targetElement.closest('.tab-container'); // ã¿ãã³ã³ãããç¹å® 171 var targetTabContentId = $targetElement.closest('.tab-content').data('content-id'); // ã¿ã¼ã²ããIDãå«ã¾ããã¿ãã®IDãåå¾ 172 // ç´ä¸ã®ã¿ããã¢ã¯ãã£ãã«ãã 173 $parentTabContainer.children('.tab-header').children('.tab').removeClass('active'); 174 $parentTabContainer.find('.tab[data-target="' + targetTabContentId + '"]').addClass('active'); 175 176 // ç´ä¸ã®ã¿ãã³ã³ãã³ãã表示 177 $parentTabContainer.children('.tab-body').children('.tab-content').hide(); 178 var $shown = $parentTabContainer 179 .children('.tab-body') 180 .children('.tab-content[data-content-id="' + targetTabContentId + '"]') 181 .show(); 182 183 // ã¿ã¼ã²ããè¦ç´ ã¾ã§ã¹ã¯ãã¼ã«ï¼slickã®æç¡ã§åå²ï¼ 184 function doScroll() { 185 updateHeaderHeight(); 186 $('html, body').stop(true).animate({ 187 scrollTop: $targetElement.offset().top - headerHeight - adjustmentHeight 188 }, anchorScrollSpeed); 189 } 190 191 // ã«ã«ã¼ã»ã«ãç¡ãå ´åã¯å³ã¹ã¯ãã¼ã« 192 var sel = '.carousel-primary, .carousel-2slides, .carousel-3slides, .carousel-4slides, .carousel-video, .carousel-group-service, .carousel-step, .carousel-flow, .carousel-sp-normal-scroll'; 193 var $inTab = $shown.find(sel).filter('.slick-initialized'); 194 if (!$inTab.length) { 195 doScroll(); 196 return; 197 } 198 199 // ã«ã«ã¼ã»ã«ãããå ´åï¼ãªãã¬ãã·ã¥å®äºãå¾ ã£ã¦ããã¹ã¯ãã¼ã«ï¼ä
199¿éºã¿ã¤ã ã¢ã¦ãä»ãï¼ 200 var remaining = $inTab.length; 201 var finished = false; 202 var timer = setTimeout(function(){ 203 if (!finished) { finished = true; doScroll(); } 204 }, 600); // å¿ è¦ãªã調æ´ï¼200ã800msç®å®ï¼ 205 206 function oneDone() { 207 if (finished) return; 208 remaining--; 209 if (remaining <= 0) { 210 finished = true; 211 clearTimeout(timer); 212 doScroll(); 213 } 214 } 215 216 $inTab.each(function(){ 217 var $s = $(this); 218 // refresh/setPosition å¾ã«çºç«ããã¤ãã³ãã1åã ãå¾ ã¤ 219 $s.one('setPosition.anchorFix reInit.anchorFix', oneDone); 220 try { 221 $s.slick('refresh'); // refreshã使ããå ´å 222 } catch (e) { 223 // ãã©ã¼ã«ããã¯ï¼refreshæªå®è£ ã®slickç¨ï¼ 224 try { $s.slick('setPosition'); } catch(_) {} 225 try { $s.slick('resize'); } catch(_) {} 226 // ãã©ã¼ã«ããã¯æã¯ã¤ãã³ããæ¥ãªãå ´åããããããä¸è¨ã¿ã¤ã ã¢ã¦ãã§ä¿éº 227 } 228 }); 229 } 230 }); 231 } 232}); 233 234// ã¢ã³ã«ã¼ãªã³ã¯ï¼ãã¼ã¸å ãªã³ã¯ï¼ãè¸ãã ã¨ãã®ã¹ã¯ãã¼ã«å¦ç 235// ----------------------------------------------------------------------- 236 237$(function () { 238 $('.renewal-wrapper a[href^="#"]').on("click", function (e) { 239 // ããã©ã«ãã®ãªã³ã¯åä½ãç¡å¹å 240 e.preventDefault(); 241 242 // ãããã®é«ããååå¾ 243 updateHeaderHeight(); 244 245 var targetId = this.getAttribute("href"); 246 247 // href ã '#' ã®å ´åã¯ãããã«ã¹ã¯ãã¼ã«ãã 248 if (targetId === "#") { 249 $("html, body").animate({ scrollTop: 0 }, anchorScrollSpeed); 250 } else { 251 var target = $(targetId); 252 // ãããã¼ã®é«ããèæ ®ããä½ç½®ã§æ¢ãã 253 if (target.length) { 254 $("html, body").animate({ scrollTop: target.offset().top - headerHeight - adjustmentHeight }, anchorScrollSpeed); 255 } 256 } 257 }); 258}); 259 260// é常ã¿ãã³ã³ãã³ãï¼é åèªä½ãåãæ¿ãããã®ï¼ 261// ----------------------------------------------------------------------- 262 263$(function () { 264 $(document).on("click keydown", ".renewal-wrapper .tab-header.target-tab-content .tab", function (event) { 265 // ã¯ãªãã¯ãã¨ã³ã¿ã¼ãã¼å ¥åãã¹ãã¼ã¹ãã¼å ¥åã®ããããã®å ´å 266 if (event.type === "click" || event.key === "Enter" || event.key === " ") { 267 // Space ãã¼ã®ã¹ã¯ãã¼ã«ãé²ã 268 event.preventDefault(); 269 270 // ã¯ãªãã¯ãããã¿ãããã§ã« active ã§ããã°å¦çãçµäº 271 if ($(this).hasClass("active")) { 272 return; 273 } 274 275 // è¦ç´ ã®å¤æ°å 276 var $tabHeader = $(this).closest(".tab-header"); 277 var $tabBody = $(this).closest(".tab-container").children(".tab-body"); 278 var targetId = $(this).data("target"); 279 var $targetContent = $tabBody.children('[data-content-id="' + targetId + '"]'); 280 281 // ã¢ã¯ãã£ããªã¿ãã®ã¯ã©ã¹ãåé¤ããæ°ããã¿ãã«è¿½å 282 $tabHeader.find(".tab").removeClass("active"); 283 $(this).addClass("active"); 284 285 // ã¿ãã³ã³ãã³ã表示ã®åãæ¿ã 286 $tabBody.children(".tab-content").hide(); 287 $targetContent.show(); 288 289 // å slick ããªãã¬ãã·ã¥ 290 $targetContent.find(".carousel-primary").each(function () { 291 $(this).slick("refresh"); 292 }); 293 $targetContent.find(".carousel-2slides").each(function () { 294 $(this).slick("refresh"); 295 }); 296 $targetContent.find(".carousel-3slides").each(function () { 297 $(this).slick("refresh"); 298 }); 299 $targetContent.find(".carousel-4slides").each(function () { 300 $(this).slick("refresh"); 301 }); 302 $targetContent.find(".carousel-video").each(function () { 303 $(this).slick("refresh"); 304 }); 305 $targetContent.find(".carousel-group-service").each(function () { 306 $(this).slick("refresh"); 307 }); 308 $targetContent.find(".carousel-step").each(function () { 309 $(this).slick("refresh"); 310 }); 311 $targetContent.find(".carousel-flow").each(function () { 312 $(this).slick("refresh"); 313 }); 314 $targetContent.find(".carousel-sp-normal-scroll").each(function () { 315 $(this).slick("refresh"); 316 }); 317 318 319 320 // slick ã®ã¹ããæã¢ãã¼ä½ç½®èª¿æ´ 321 adjustSlickArrowPosition(); 322 } 323 }); 324 325 // ã¢ã³ã«ã¼ãªã³ã¯å¯¾å¿å¦ç 326 function activateTabFromHash(shouldScroll) { 327 // URL ã® #以éãåå¾ 328 var hash = window.location.hash; 329 if (hash) { 330 var $targetElement = $(hash); 331 332 // 該å½è¦ç´ ããã¼ã¸å ã«åå¨ããå ´å 333 if ($targetElement.length) { 334 // ãããã®é«ããååå¾ 335 updateHeaderHeight(); 336 337 // ã¿ãã³ã³ãã³ãå ã«åå¨ããå ´å 338 if ($targetElement.closest(".tab-content").length) { 339 var $tabBody = $targetElement.closest(".tab-body"); 340 var $tabHeader = $tabBody.siblings(".tab-header"); 341 var targetId = $targetElement.closest(".tab-content").data("c
341ontent-id"); 342 343 // 該å½ããã¿ããã¢ã¯ãã£ãå 344 $tabHeader.find(".tab").removeClass("active"); 345 $tabHeader.find('[data-target="' + targetId + '"]').addClass("active"); 346 347 // ã¿ãã³ã³ãã³ã表示ã®åãæ¿ã 348 $tabBody.children(".tab-content").hide(); 349 $tabBody.children('[data-content-id="' + targetId + '"]').show(); 350 } 351 352 // ã¹ã¯ãã¼ã«ãããå¦ãã§ã¹ã¯ãã¼ã«ã¹ãã¼ããå¤ãã 353 var speed = 0; 354 if (shouldScroll) { 355 speed = anchorScrollSpeed; 356 } 357 358 // 該å½è¦ç´ ã«ã¹ã¯ãã¼ã« 359 $("html, body").animate({ scrollTop: $targetElement.offset().top - headerHeight - adjustmentHeight }, speed); 360 } 361 } 362 } 363 364 // ãã¼ã¸èªã¿è¾¼ã¿æã«ã¢ã³ã«ã¼ãªã³ã¯å¯¾å¿ãå®è¡ 365 setTimeout(function () { 366 activateTabFromHash(false); // ãã¼ã¸èªã¿è¾¼ã¿æã¯ã¹ã¯ãã¼ã«ã¯ä¸è¦ 367 }, 1); 368 369 // URL ã®ããã·ã¥ã夿´ãããã¨ããã¿ããåãæ¿ã 370 $(window).on("hashchange", function () { 371 activateTabFromHash(true); 372 }); 373}); 374 375 376 377 378
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.