1jQuery(function ($) { 2 // common 3 (function () { 4 var $header = $("#js-header"); 5 // $("body,html").removeClass("no-scroll"); 6 // console.log('load'); 7 /////////////////////////////////////////////////////// 8 //First View Full Screen 9 // æåã«ããã¥ã¼ãã¼ãã®é«ããåå¾ãã0.01ãæãã¦1%ã®å¤ãç®åºãã¦ãvhåä½ã®å¤ãåå¾ 10 // ã«ã¹ã¿ã 夿°--vhã®å¤ãããã¥ã¡ã³ãã®ã«ã¼ãã«è¨å® 11 // height: calc(var(--vh) * 100); = 100vh 12 function adjustHeight() { 13 let vh = window.innerHeight * 0.01; 14 document.documentElement.style.setProperty("--vh", `${vh}px`); 15 } 16 adjustHeight(); 17 18 //ã¹ãã以å¤ãªãµã¤ãºå¯¾å¿ 19 if (!navigator.userAgent.match(/(iPhone|iPad|iPod|Android)/)) { 20 window.addEventListener("resize", () => { 21 adjustHeight(); 22 }); 23 } else { 24 // ã¹ããã¯ç¸¦æ¨ªå¤æ´ã®ã¿ 25 window.addEventListener("orientationchange", () => { 26 adjustHeight(); 27 }); 28 } 29 ///////////////////////////////////////////////////////////// 30 31 ///////////////////////////////////////////////////////////// 32 //CURRENT NAV 33 // $(document).ready(function () { 34 // if (location.pathname != "/") { 35 // $('#gnav a[href^="/' + location.pathname.split("/")[1] + '"]').addClass( 36 // "active" 37 // ); 38 // } 39 // }); 40 ///////////////////////////////////////////////////////////// 41 42 ///////////////////////////////////////////////////////////// 43 // navigation 44 $("#spNav-toggle").on("click", function (e) { 45 e.preventDefault(); 46 $header.toggleClass("add-active"); 47 var scrollBarWidth = window.innerWidth - $(window).width(); 48 $("body,html").toggleClass("no-scroll"); 49 $("body").css("margin-right", `${scrollBarWidth}px`); 50 }); 51 52 $(".js-navLink, #js-overlay").on("click", function (e) { 53 $header.removeClass("add-active"); 54 $("body,html").toggleClass("no-scroll"); 55 $("body").css("margin-right", 0) 56 }); 57 58 var pcWidth = window.matchMedia("screen and (min-width: 769px)"); 59 function checkBreakPoint() { 60 if (pcWidth.matches) { 61 $header.removeClass("add-active"); 62 $("body,html").removeClass("no-scroll"); 63 $("body").css("margin-right", 0) 64 } 65 } 66 pcWidth.addListener(checkBreakPoint); 67 checkBreakPoint(); 68 ///////////////////////////////////////////////////////////// 69 70 ///////////////////////////////////////////////////////////// 71 //ã¹ã¯ãã¼ã«ä¸ã®ã¿æ¶ãã 72 $(window).on("scroll touchmove", function(){ //ã¹ã¯ãã¼ã«ä¸ã«å¤æãã 73 $(".hideWhileScroll").stop(); //ã¢ãã¡ã¼ã·ã§ã³ãã¦ããå ´åãã¢ãã¡ã¼ã·ã§ã³ãå¼·å¶åæ¢ 74 $(".hideWhileScroll").css('display', 'none').delay(500).fadeIn('1000'); 75 //ã¹ã¯ãã¼ã«ä¸ã¯é表示ã«ãã¦ã500ããªç§é ããã¦åã³è¡¨ç¤º 76 }); 77 ///////////////////////////////////////////////////////////// 78 79 ///////////////////////////////////////////////////////////// 80 //tab 81 $('.common__tab_box .tab_btn').click(function() { 82 var parent = $(this).closest(".common__tab_box"); 83 var index = parent.children('.btn_area').children('.tab_btn').index(this); 84 parent.find('.tab_btn').removeClass('active'); 85 parent.find('.tab_panel').removeClass('active'); 86 $(this).addClass('active'); 87 parent.children('.panel_area').children('.tab_panel').eq(index).addClass('active'); 88 }); 89 ///////////////////////////////////////////////////////////// 90 91 ///////////////////////////////////////////////////////////// 92 // smooth scroll 93 $('a[href^="#"]').on("click", function (e) { 94 var speed = 500; 95 var href = $(this).attr("href"); 96 var target = $(href === "#" || href === "" ? "html" : href); 97 //var position = target.offset().top - $header.outerHeight(); 98 //$("html, body").animate({ scrollTop: position }, speed, "swing"); 99 //e.preventDefault(); 100 101 if (target.length) { 102 if ($header.length) { 103 //alert('header'); 104 var position = target.offset().top - $header.outerHeight(); 105 $("html, body").animate({ scrollTop: position }, speed, "swing"); 106 e.preventDefault(); 107 108 } else { 109 //alert('no header'); 110 return 111 } 112 } 113 114 });
115 ///////////////////////////////////////////////////////////// 116 117 ///////////////////////////////////////////////////////////// 118 // header scrolled 119 // $(window).on("scroll", function () { 120 // if ($(this).scrollTop() > $("#js-hero").outerHeight()) { 121 // $("body").addClass("add-scrolled"); 122 // } else { 123 // $("body").removeClass("add-scrolled"); 124 // } 125 // }); 126 ///////////////////////////////////////////////////////////// 127 128 ///////////////////////////////////////////////////////////// 129 // WOW 130 // https://wowjs.uk/docs.html 131 new WOW({ 132 offset: 200, 133 }).init(); 134 ///////////////////////////////////////////////////////////// 135 136 ///////////////////////////////////////////////////////////// 137 // Scroll-hint : add .js-scrollable to the element 138 // https://appleple.github.io/scroll-hint/ 139 // new ScrollHint('.js-scrollable', { 140 // i18n: { 141 // scrollable: 'scroll' 142 // } 143 // }); 144 ///////////////////////////////////////////////////////////// 145 146 ///////////////////////////////////////////////////////////// 147 // Swiper 148 // https://swiperjs.com/ 149 // const swiper = new Swiper('.swiper', { 150 // speed: 400, 151 // spaceBetween: 100, 152 // }); 153 ///////////////////////////////////////////////////////////// 154 155 ///////////////////////////////////////////////////////////// 156 // MW WP FORM Scroll to Error 157 // if ($(".error")[0]) { 158 // var errorEl = $(".error")[0].closest('.contact__row'); 159 // var position = $(errorEl).offset().top - 100; 160 161 // $("body,html").delay(200).animate({ scrollTop: position }, 600, "swing"); 162 // } 163 ///////////////////////////////////////////////////////////// 164 })(); 165});
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.