1// JavaScript Document / 2 3 4//----------------------------------------------------------------------------- 5// ããã¯ã¼ 6//---------------------------------------------------------------------------- 7$('.header__btn').on('click', function () { 8 $(this).toggleClass("open"); 9 $('nav').toggleClass("open"); 10 $('body').toggleClass("open"); 11 return false; 12}); 13$(document).on('click', 'nav.open a', function () { 14 $('.header__btn').trigger('click'); 15}) 16 17$(document).on('click',function(e) { // ç»é¢ã¯ãªã㯠18 if(!$(e.target).closest('header').length) { // ãããã¼ä»¥å¤ãæ¡ä»¶å¤å® 19 // ã¯ã©ã¹åé¤ 20 $(".header__btn").removeClass("open"); 21 $("nav").removeClass("open"); 22 $("body").removeClass("open"); 23 } 24}); 25 26 27//----------------------------------------------------------------------------- 28// ãã§ã¼ãã¤ã³ã¢ãã¡ã¼ã·ã§ã³ 29//---------------------------------------------------------------------------- 30function showElementAnimation() { 31 32 var element = document.getElementsByClassName('item'); 33 if (!element) return; // è¦ç´ ããªãã£ããå¦çããã£ã³ã»ã« 34 35 var showTiming = window.innerHeight > 768 ? 200 : 40; // è¦ç´ ãåºã¦ããã¿ã¤ãã³ã°ã¯ããã§èª¿æ´ 36 var scrollY = window.pageYOffset; 37 var windowH = window.innerHeight; 38 39 for (var i = 0; i < element.length; i++) { 40 var elemClientRect = element[i].getBoundingClientRect(); var elemY = scrollY + elemClientRect.top; if (scrollY + windowH - showTiming > elemY) { 41 element[i].classList.add('is-show'); 42 } else if (scrollY + windowH < elemY) { 43 // ä¸ã«ã¹ã¯ãã¼ã«ãã¦å度é表示ã«ããå ´åã¯ãã¡ããè¨è¿° 44 element[i].classList.remove('is-show'); 45 } 46 } 47} 48showElementAnimation(); 49window.addEventListener('scroll', showElementAnimation); 50 51 52 53 54//----------------------------------------------------------------------------- 55// ãã¼ã¸ã®ä¸é¨ã¸æ»ããã¿ã³ 56//---------------------------------------------------------------------------- 57function PageTopAnime() { 58 var scroll = $(window).scrollTop(); 59 if (scroll >= 2000) {//ä¸ãã2000pxã¹ã¯ãã¼ã«ããã 60 $('.page-top').removeClass('DownMove');//#page-topã«ã¤ãã¦ããDownMoveã¨ããã¯ã©ã¹åãé¤ã 61 $('.page-top').addClass('UpMove');//#page-topã«ã¤ãã¦ããUpMoveã¨ããã¯ã©ã¹åãä»ä¸ 62 } else { 63 if ($('.page-top').hasClass('UpMove')) {//ãã§ã«#page-topã«UpMoveã¨ããã¯ã©ã¹åãã¤ãã¦ããã 64 $('.page-top').removeClass('UpMove');
64//UpMoveã¨ããã¯ã©ã¹åãé¤ã 65 $('.page-top').addClass('DownMove');//DownMoveã¨ããã¯ã©ã¹åã#page-topã«ä»ä¸ 66 } 67 } 68} 69 70// ç»é¢ãã¹ã¯ãã¼ã«ããããåããããå ´åã®è¨è¿° 71$(window).scroll(function () { 72 PageTopAnime();/* ã¹ã¯ãã¼ã«ããéã®åãã®é¢æ°ãå¼ã¶*/ 73}); 74 75// #page-topãã¯ãªãã¯ããéã®è¨å® 76$('.page-top').click(function () { 77 $('body,html').animate({ 78 scrollTop: 0//ãã¼ã¸ãããã¾ã§ã¹ã¯ãã¼ã« 79 }, 1500);//ãã¼ã¸ãããã¹ã¯ãã¼ã«ã®éããæ°åã大ããã»ã©é ããªã 80 return false;//ãªã³ã¯èªä½ã®ç¡å¹å 81}); 82 83 84//----------------------------------------------------------------------------- 85// ããããã¼ã¸ã¢ã¼ãã« 86//---------------------------------------------------------------------------- 87 88var scrollPos; 89// $( this ).on( 'click', function() { 90$(document).on('click', '.js-modal-open', function () { 91 scrollPos = $(window).scrollTop(); 92 let target = $(this).data('target'); 93 let modal = document.getElementById(target); 94 $(modal).fadeIn(300); 95 $('.wrapper').addClass('modal_open'); 96 if($('.hero__video video').length)$('.hero__video video').get(0).pause(); 97 return false; 98}); 99 100// ã¦ã£ã³ãã¦ãéãã 101$(document).on('click', '.js-modal-close', function () { 102 $('.js-modal').fadeOut(300); 103 $('.wrapper').removeClass('modal_open'); 104 if($('.hero__video video').length)$('.hero__video video').get(0).play(); 105 //åç»ãæ¢ãã(originã«å ãã¼ã¸ã®URLãå ¥ã£ã¦ããªãã¨åããªã) 106 if($('#player').length){ 107 var playerWindow = $('#player')[0].contentWindow; 108 playerWindow.postMessage('{"event":"command","func":"stopVideo","args":""}', '*'); 109 } 110 $(window).scrollTop(scrollPos); 111 return false; 112}); 113 114//----------------------------------------------------------------------------- 115// ã¹ã©ã¤ãã¼ 116//---------------------------------------------------------------------------- 117 118$(function () { 119 $(".thumbs a").click(function () { 120 let largePath = $(this).attr("href"); 121 $(".largeImage").attr({ 122 src: largePath 123 }); 124 return false; 125 }); 126}); 127 128 129//----------------------------------------------------------------------------- 130// ã¿ãã»ãã 131//---------------------------------------------------------------------------- 132//function GethashID (hashIDName){ 133// if(hashIDName){ 134// //ã¿ãè¨å® 135// $('.tab__category li').find('a').each(function() { //ã¿ãå ã®aã¿ã°å ¨ã¦ãåå¾ 136// var idName = $(this).attr('href'); //ã¿ãå ã®aã¿ã°ã®ãªã³ã¯åï¼ä¾ï¼#lunchã®å¤ãåå¾ 137// if(idName == hashIDName){ //ãªã³ã¯å ã®æå®ãããURLã®ããã·ã¥ã¿ã°ï¼ä¾ï¼http://example.com/#lunchâãã®#ã®å¤ã¨ã¿ãå ã®ãªã³ã¯åï¼ä¾ï¼#lunchãåããããã§ã㯠138// var parentElm = $(this).parent(); //ã¿ãå ã®aã¿ã°ã®è¦ªè¦ç´ ï¼liï¼ãåå¾ 139// $('.tab__category li').removeClass("active"); //ã¿ãå ã®liã«ã¤ãã¦ããactiveã¯ã©ã¹ãåãé¤ã 140// $(parentElm).addClass("active"); //ãªã³ã¯å ã®æå®ãããURLã®ããã·ã¥ã¿ã°ã¨ã¿ãå ã®ãªã³ã¯åãåãã§ããã°ãliã«activeã¯ã©ã¹ã追å 141// //表示ãããã¨ãªã¢è¨å® 142// $(".tab__contents").removeClass("is-active"); //ãã¨ãã¨ã¤ãã¦ããis-activeã¯ã©ã¹ãåãé¤ã 143// $(hashIDName).addClass("is-active"); //表示ããããã¨ãªã¢ã®ã¿ããªã³ã¯åãã¯ãªãã¯ãããã表示ã¨ãªã¢ã«is-activeã¯ã©ã¹ã追å 144// } 145// }); 146// } 147//} 148// 149////ã¿ããã¯ãªãã¯ããã 150//$('.tab__category a').on('click', function() { 151// var idName = $(this).attr('href'); //ã¿ãå ã®ãªã³ã¯åãåå¾ 152// GethashID (idName);//è¨å®ããã¿ãã®èªã¿è¾¼ã¿ã¨ 153// return false;//aã¿ã°ãç¡å¹ã«ãã 154//}); 155// 156// 157//// ä¸è¨ã®åãããã¼ã¸ãèªã¿è¾¼ã¾ãããããã«åãã 158//$(window).on('load', function () { 159// $('.tab__category li:first-of-type').addClass("active"); //æåã®liã«activeã¯ã©ã¹ã追å 160// $('.tab__contents:first-of-type').addClass("is-active"); //æåã®.areaã«is-activeã¯ã©ã¹ã追å 161// var hashName = location.hash; //ãªã³ã¯å ã®æå®ãããURLã®ããã·ã¥ã¿ã°ãåå¾ 162// GethashID (hashName);//è¨å®ããã¿ãã®èªã¿è¾¼ã¿ 163//}); 164// 165 166 167//----------------------------------------------------------------------------- 168// ã¹ã©ã¤ãã¼ 169//---------------------------------------------------------------------------- 170$(function () { 171 $('.slider').slick({
172 arrows: false, 173 dots: true, 174 fade: true, 175 autoplay: true, 176 autoplaySpeed: 3000, 177 speed: 1000, 178 slidesToShow: 1, 179 }); 180}); 181 182 183//----------------------------------------------------------------------------- 184// ãã´ç»ååãæ¿ã 185//---------------------------------------------------------------------------- 186 187$(window).on('load resize', function() { 188 $(window).on('scroll', function() { 189 if(location.pathname != '/'){ 190 let scrollY = $(this).scrollTop(); 191 let logo_s = $('.header__logo').offset().top; 192 let footer_t = $('footer').offset().top; 193 let footer_h = $('footer').outerHeight()+footer_t; 194 if (scrollY > 0) { 195 $('.header__logo').addClass('mini'); 196 $('.switch__language').addClass('mini'); 197 $('.header__btn').addClass('mini'); 198 199 } else { 200 $('.header__logo').removeClass('mini'); 201 $('.switch__language').removeClass('mini'); 202 $('.header__btn').removeClass('mini'); 203 } 204 if (footer_t < logo_s && footer_h > logo_s) { 205 $('.header .header__logo img').attr('src', '/wp-content/themes/en_netsuke/img/common/LOGO.svg') 206 if(!$('.header__logo').hasClass('mini'))$('.header__logo').addClass('mini'); 207 if(!$('.switch__language').hasClass('mini'))$('.switch__language').addClass('mini'); 208 if(!$('.header__btn').hasClass('mini'))$('.header__btn').addClass('mini'); 209 } else { 210 $('.header .header__logo img').attr('src', '/wp-content/themes/en_netsuke/img/common/LOGO_bk.svg') 211 } 212 } 213 }); 214}); 215/*ææ¥ã®è¨³ãµã³ãã« 216$(window).on('load', function() { 217 cal_en(); 218}); 219$(document).on('click', '.calbtn', function () { 220 cal_en(); 221}); 222function cal_en(){ 223 var arr = { 224 '<th>æ¥</th>' : '<th>S</th>', 225 '<th>æ</th>' : '<th>M</th>', 226 '<th>ç«</th>' : '<th>T</th>', 227 '<th>æ°´</th>' : '<th>W</th>', 228 '<th>æ¨</th>' : '<th>T</th>', 229 '<th>é</th>' : '<th>F</th>', 230 '<th>å</th>' : '<th>S</th>' 231 }; 232 var elm = $('table.bizcal'); 233 elm.each(function(i){ 234 $.each(arr,function(key,value){ 235 var txt = elm.eq(i).html(); 236 elm.eq(i).html(txt.replace(key,value)); 237 }); 238 }); 239} 240*/
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.