1/*----------------------------------------------- 2 * Root 3-------------------------------------------------*/ 4var root = $("body").data('root'); 5var page = $("body").data('page'); 6 7 8/*----------------------------------------------- 9 * COMMON 10-------------------------------------------------*/ 11$(function(){ 12 13 // Anchor Smooth Scroll 14 $('.js-anchor').on('click', function(){ 15 var speed = 1000; 16 var href= $(this).attr("href"); 17 var target = $(href == "#" || href == "" ? 'html' : href); 18 var position = target.offset().top; 19 $('body,html').animate({scrollTop:position}, speed, 'easeOutQuart'); 20 return false; 21 }); 22 23 // Menu 24 $('.js-menu').on('click', function(){ 25 $(this).toggleClass('is-active'); 26 27 if($(this).hasClass('is-active')){ 28 $('.js-header').addClass('is-active'); 29 $('.header__navBtnWrap-sticky').addClass('is-active'); 30 } else { 31 $('.js-header').removeClass('is-active'); 32 $('.header__navBtnWrap-sticky').removeClass('is-active'); 33 } 34 }); 35 36 $('.headerNavLists__item a').on('click', function (){
37 $('.js-header').removeClass('is-active'); 38 $('.js-menu').removeClass('is-active'); 39 $('.header__navBtnWrap-sticky').removeClass('is-active'); 40 }); 41 42 43 /** 44 * Modal open 45 */ 46 // Common 47 $('.js-modalOpen').on('click', function(){ 48 var modalID = $(this).data('modal'); 49 $('#' + modalID).fadeIn(500); 50 $('.modalBox').fadeIn(500); 51 $('body').css({'overflow':'hidden'}); 52 }); 53 54 // Youtube 55 $('.js-youtubePlay').on('click', function(){ 56 var ytID = $(this).data('ytid'); 57 var ytURL = 'https://www.youtube.com/embed/'+ytID+'?autoplay=1&rel=0'; 58 setTimeout(function(){ 59 $('.js-youtubeIframe').attr('src',ytURL); 60 },100); 61 }); 62 63 64 /** 65 * Modal close 66 * iframeã®srcãcloseã®éã«æ¶ã 67 */ 68 var $modalIF = $('.js-youtubeIframe'); 69 70 // Closeå¦ç 71 function modalClose() { 72 $('.modalBox, .oneModal').fadeOut(500); 73 setTimeout(function(){ 74 $modalIF.attr('src',''); 75 },500); 76 $('body').css({'overflow':''}); 77 } 78 79 // Closeãã¿ã³ 80 $('.js-modalClose').on('click', function(){ 81 modalClose(); 82 }); 83 84 // Close ã¨ãªã¢å¤ 85 $('.js-oneModalIn').on('click touchend', function(e) { 86 if (!$(e.target).closest('.js-oneModalIn__cont').length) { 87 modalClose(); 88 } 89 }); 90 91 // ã¢ã¯ã»ã¹æèªåã¢ã¼ãã« 92 if($("#test")[0]){ 93 $("#test").click() 94} 95 96 97}); 98 99 100/*----------------------------------------------- 101 * ACCESS HISTORY [ã»ãã·ã§ã³ã¹ãã¬ã¼ã¸ã使ç¨ãã¦ååã¢ã¯ã»ã¹ãå¤å®ãããã¤] 102----------------------------------------------- */ 103function accessHistory() { 104 const keyName = 'visited'; 105 const keyValue = true; 106 if (!sessionStorage.getItem(keyName)) { 107 //FIRST ACCESS 108 sessionStorage.setItem(keyName, keyValue); 109 return true; 110 } else { 111 $('body').addClass('is-visited'); 112 return false; 113 } 114} 115$(document).ready(accessHistory()); 116 117 118/*----------------------------------------------- 119 * ScrollAnimation for IntersectionObserver [.js-scrani è¦ç´ ãè¦ããã is-ani ãaddclass ãããã¤] 120-------------------------------------------------*/ 121const set_scrani = () =>{ 122 const SCRANI_ACTIVE_CLASSNAME = 'is-ani'; 123 const scrani_callback = (entries) => { 124 //å entryï¼IntersectionObserverEntry ãªãã¸ã§ã¯ãï¼ã«å¯¾ã㦠125 entries.forEach( (entry) => { 126 //ç£è¦å¯¾è±¡ã®è¦ç´ ãé åå ã«å ¥ã£ãå ´åã®å¦ç 127 if (entry.isIntersecting) { 128 //ç£è¦å¯¾è±¡ã®è¦ç´ ï¼entry.targetï¼ã« is-ani ã¯ã©ã¹ã追å 129 entry.target.classList.add(SCRANI_ACTIVE_CLASSNAME); 130 } 131 }); 132 } 133 const scrani_option = { 134 rootMargin: '-30% 0px', 135 } 136 const scrani_observer = new IntersectionObserver(scrani_callback, scrani_option); 137 138 const target_scrani = document.querySelectorAll('.js-scrani'); 139 //å ¨ã¦ã®ç£è¦å¯¾è±¡è¦ç´ ã observe() ã¡ã½ããã«æå® 140 target_scrani.forEach( (elem) => { 141 //observe() ã«ç£è¦å¯¾è±¡ã®è¦ç´ ãæå® 142 scrani_observer.observe(elem); 143 }); 144} 145 146 setTimeout(function(){ 147 set_scrani(); 148 },200); 149 150
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.