1// JavaScript Document 2 3 4// Global ---------------------------------------- 5 6const windowWidth = $(window).width(); // ã¦ã£ã³ãã¦å¹ åå¾ 7const windowSm = 768; // ãã¬ã¤ã¯ãã¤ã³ã 8 9 10// é»è©±çªå· ---------------------------------------- 11 12if(navigator.userAgent.match(/(iPhone|iPad|Android|Mobile)/)){ 13 $('.tel').each(function(){ 14 const str = $(this).html(); 15 if($(this).children().is('img')){ 16 $(this).html($('<a>').attr('href', 'tel:' + $(this).children().attr('alt').replace(/-/g, '')).append(str + '</a>')); 17 } else { 18 $(this).html($('<a>').attr('href', 'tel:' + $(this).text().replace(/-/g, '')).append(str + '</a>')); 19 } 20 }); 21} 22 23 24// ããªã¬ã¼ã§åºã¦ããè¦ç´ ---------------------------------------- 25 26$(window).on('scroll load', function(){ 27 $('.anime').each(function(){ 28 const imgPos = $(this).offset().top; 29 const scroll = $(window).scrollTop(); 30 const windowHeight = $(window).height(); 31 if(scroll > imgPos - windowHeight + windowHeight/5){ 32 $(this).addClass('trigger') 33 } 34 }); 35}); 36 37 38// Gãã ---------------------------------------- 39 40$('#nav #sp_menu').on('click', function(){ // SPãã³ãã¼ã¬ã¼ã¢ã¼ãã« 41 $('html, body').toggleClass('spnav_modal'); 42 $(this).toggleClass('close'); 43 $('#nav .gnav_subnav').slideToggle(); 44 return false; 45}); 46$('#nav #menu_close').click(function(){ // ã¨ãããã¿ã³ 47 $('html, body').removeClass('spnav_modal'); 48 $('#nav #sp_menu').removeClass('close'); 49 $('#nav .gnav_subnav').slideUp(); 50 return false; 51}); 52 53// ãã³ãã¼ã¬ã¼å ãã¹ã¯ãã¼ã«å¦ç 54const setVh = () => { 55 const vh = window.innerHeight * 0.01; 56 document.documentElement.style.setProperty('--vh', `${vh}px`); 57} 58window.addEventListener('load', setVh); 59 60// ãã³ãã¼ã¬ã¼å ããªãµã¤ãºå¦ç 61let vw = window.innerWidth; 62window.addEventListener('resize', () => { 63 if (vw === window.innerWidth) { 64 return; // ç»é¢ã®æ¨ªå¹ ã«ãµã¤ãºå¤åããªãã®ã§å¦çãçµãã 65 } 66 // ç»é¢ã®æ¨ªå¹ ã®ãµã¤ãºå¤åããã£ãæã®ã¿é«ããåè¨ç®ãã 67 vw = window.innerWidth; 68 setVh(); 69}); 70setVh(); // åæå 71 72// 診çå 容ãããããã¦ã³ã¡ãã¥ã¼ 73if(windowWidth < windowSm){ // ã¹ããã¯è¨ºçå 容ãéãã¦ãã 74 $('#nav .sub').addClass('close'); 75} 76$('#nav .sub').click(function(){ 77 $(this).toggleClass('close').next('#nav .subbox').slideToggle(); 78 if(windowWidth >= windowSm){ // PCã®å ´å 79 $('#nav .sub').not(this).removeClass('close').next('#nav .subbox').slideUp(); 80 } 81 return false; 82}); 83 84// ã¨ãªã¢å¤ã¯ãªãã¯ã§éãã 85$(window).on('click', function(e){ 86 if(windowWidth < windowSm){ // ã¹ããã®å ´å 87 if($('.spnav_modal').is(':visible')){ 88 if(!$(e.target).closest('#nav .gnav_subnav').length){ 89 $('html, body').removeClass('spnav_modal'); 90 $('#nav #sp_menu, #nav #menu_close').removeClass('close'); 91 $('#nav .gnav_subnav').slideUp(); 92 } 93 } 94 } else { // PCã®å ´å 95 $('html, body').removeClass('spnav_modal'); 96 if($('#nav .subbox').is(':visible')){ 97 if(!$(e.target).closest('#nav').length){ // ã¿ãã¬ããå¯¾å¿ 98 $('#nav .sub').removeClass('close'); 99 $('#nav .subbox').slideUp(); 100 } 101 } 102 } 103}); 104 105 106 107// ã«ã¬ã³ãã¡ãã¥ã¼å¦ç ---------------------------------------- 108 109const currentURL = location.href; // URLåå¾ 110$('#nav .current, .subnav .current').removeClass('current'); 111$('#nav a, .subnav a').filter(function(){ 112 return $(this).prop('href')==currentURL; 113}).addClass('current'); 114 115 116 117// ãããããã¼ãã¸ã¥ã¢ã«ãslick ---------------------------------------- 118 119$('#keyvsl').slick({ 120 cssEase: 'linear', // ä¸å®é度 121 autoplay: true, // Autoplay 122 autoplaySpeed: 5000, // ã¤ã³ã¿ã¼ãã« 123 speed: 700, // åæ¿æé 124 arrows: false, // Prev/Next 125 dots: false, // ã¤ã³ã¸ã±ã¼ã¿ã¼ 126 fade: true, 127 pauseOnFocus: false,//ãã©ã¼ã«ã¹ã§ä¸æåæ¢ 128 pauseOnHover: false,//ãã¦ã¹ããã¼ã§ä¸æåæ¢ 129 pauseOnDotsHover: false//ãããããããã¦ã¹ããã¼ã§ä¸æåæ¢ 130}); 131$('#keyvsl').delay(50).css('visibility','visible'); 132 133 134// ãããããç¥ãããã¢ã³ã¼ãã£ãªã³ ---------------------------------------- 135 136$('.news_title').slice(0, 3).addClass('close'); // ææ°3åã¯å±é 137$('.news_title').click(function(){ 138 $(this).toggleClass('close').next('.news_body').slideToggle(); 139}); 140$('.news_title').keydown(function(evt){ // ãã¼ãã¼ãæä½ 141 if (evt.key == 'Enter') { // Enterãã¼ã§éé 142 $(this).toggleClass('close').next('.news_body').slideToggle(); 143 } 144}); 145 146 147// ã¯ãªããã¯ç´¹ä»ã®ã£ã©ãªã¼ slick ---------------------------------------- 148 149// $(".gallery_slider").each(function(){ // ã¡ã¤ã³ç»å 150// $(this).slick({
151// cssEase: 'linear', // ä¸å®é度 152// // autoplay: true, // Autoplay 153// // autoplaySpeed: 5000, // ã¤ã³ã¿ã¼ãã« 154// dots: true, // ã¤ã³ã¸ã±ã¼ã¿ã¼ 155// fade: true, 156// speed: 500, // åæ¿æé 157// adaptiveHeight: true, // å 容ã«ãã£ã¦é«ãå¯å¤ 158// asNavFor: "#" + $(this).attr("id") + "_nav" // è¤æ°ã¹ã©ã¤ãå¯¾å¿ 159// }); 160// }); 161// $(".gallery_thum").each(function(){ // ãµã ã 162// $(this).slick({ 163// slidesToShow: 7, 164// slidesToScroll: 1, 165// centerMode: true, 166// centerPadding: 0, 167// arrows: false, // Prev/Next 168// cssEase: 'linear', // ä¸å®é度 169// focusOnSelect: true, // ã¯ãªãã¯ã§åãæ¿ã 170// asNavFor: "#" + $(this).attr("id").replace("_nav", ""), // è¤æ°ã¹ã©ã¤ãå¯¾å¿ 171// responsive: [{ 172// breakpoint: 767, // ã¹ããã®å ´å 173// settings: { 174// slidesToShow: 3, 175// },}, 176// ] 177// }); 178// }); 179// $('.gallery').delay(50).css('visibility','visible'); 180 181 182// ã¹ãã£ããã¼ãããã¼ãã¹ã¯ãã¼ã«å¦ç ---------------------------------------- 183 184const body_height = $(document).innerHeight(); // ãã¼ã¸å ¨ä½ã®é«ã 185const win_height = $(window).innerHeight(); // ã¦ã£ã³ãã¦ã®é«ã 186let pos_bottom = body_height - win_height; // ãã¼ã¸ã®æä¸é¨ä½ç½® 187let pos_scr = 0; // ã¹ã¯ãã¼ã«ã®ä½ç½®ãåæå 188const sp_header = $('.header .logo, #sp_menu'); 189const pc_header = $('.header, .subbox'); 190const sticky = $('.main').offset().top; 191$(window).on('load scroll', function() { 192 if(windowWidth < windowSm){ // ã¹ããã®å ´å 193 if($(this).scrollTop() < pos_scr){ // ä¸ã¹ã¯ãã¼ã« 194 sp_header.removeClass('hide'); 195 } else { 196 if(pos_scr >= 200){ // ä¸ã¹ã¯ãã¼ã« 197 sp_header.addClass('hide'); 198 } 199 } 200 if(pos_bottom * 0.98 <= $(window).scrollTop()){ // ä¸çªä¸ã¾ã§è¡ã£ããåºç¾ 201 sp_header.removeClass('hide'); 202 } 203 } 204 if(windowWidth >= windowSm){ // PCã®å ´å 205 if($(this).scrollTop() > 20){ // ä¸ã¹ã¯ãã¼ã« 206 pc_header.addClass('header_small'); 207 } else { 208 pc_header.removeClass('header_small'); 209 } 210 } 211 pos_scr = $(this).scrollTop(); 212}); 213 214 215// ã¹ã ã¼ãºã¹ã¯ãã¼ã« ---------------------------------------- 216 217$('.scr').click(function(){ 218 const href= $(this).attr('href'); 219 const target = $(href == '#' || href == '' ? 'html' : href); 220 const position = target.offset().top - 20; 221 $('html, body').animate({scrollTop: position}, 500, 'swing'); 222 return false; 223}); 224 225 226 227// SPããã¿ã¼åºå®ãé»è©±ã»WEbäºç´ã»ãã¼ã¸ã¢ãã ---------------------------------------- 228 229$('#tel_up').hide(); 230$(window).scroll(function(){ 231 if($(this).scrollTop() > 200){ 232 $('#tel_up').fadeIn().css('visibility', 'visible'); 233 } else { 234 $('#tel_up').fadeOut(); 235 } 236}); 237$('#pageup').on('click', function(){ 238 $('html, body').animate({ scrollTop: 0 }, 500, 'swing'); 239 return false; 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.