1/* 2 * script.js 3 * 4 */ 5 6 7 /*********************************************************************************************/ 8//HumbergerMenu 9/*********************************************************************************************/ 10 (function($) { 11 $(function() { 12 $('#nav-toggle').click(function(){ 13 $('body').toggleClass('open'); 14 }); 15 }); 16 })(jQuery); 17 18 19/*********************************************************************************************/ 20//ãªã¼ããã³ã°ã¢ãã¡ã¼ã·ã§ã³ 21/**********************************************************************************************/ 22 23(function ($) { 24 'use strict'; 25 $(window).on('load',function(){ 26 $('body').addClass('appear'); 27 }); 28})(jQuery); 29 30 31 32 33/*********************************************************************************************/ 34//bgScale 35/**********************************************************************************************/ 36if(!navigator.userAgent.match(/(iPhone|iPad|iPod|Android)/)){ 37$(window).scroll(function() { 38 var scroll = $(window).scrollTop(); 39 $('.product__firstImg').css({ 40 backgroundSize: (80 + scroll/50) + "%", 41 }); 42}); 43} 44 45/*********************************************************************************************/ 46//è¦ç´ ã®åºç¾ 47/**********************************************************************************************/ 48 49 const getRandomInt = (min, max) => { 50 return Math.floor(Math.random() * (max - min) + min); 51} 52 53const ScrollAnimation = { 54 instance: undefined, 55 set() { 56 this.instance = new IntersectionObserver( 57 (entries) => { 58 entries.forEach((entry) => { 59 if(entry.isIntersecting) { 60 entry.target.classList.add('is-active'); 61 /*} else { 62 entry.target.classList.remove('is-active');*/ 63 } 64 }); 65 }, 66 { 67 root: null, 68 rootMargin: '0px', 69 threshold: 0, 70 } 71 ); 72 73 const blocks = document.querySelectorAll('.title-anm'); 74 blocks.forEach((block) => { 75 this.instance.observe(block); 76 }); 77 }, 78}; 79 80 81 82const SplitText = (target) => { 83 const splitElm = document.querySelectorAll(target); 84 splitElm.forEach((el, index) => { 85 let text = el.textContent; 86 el.textContent = ''; 87 text = text.split(''); 88 let newText = ''; 89 text.forEach((t, index) => { 90 newText += `<span data-random="${getRandomInt(1, 8)}">${t}</span>`; 91 }); 92 el.insertAdjacentHTML('beforeend', newText); 93 }); 94}; 95 96window.addEventListener('DOMContentLoaded', () => { 97 SplitText('.text-split'); 98 ScrollAnimation.set(); 99}); 100 101 102 103/*ã¹ã¯ãã¼ã«ã«åãã㦠jQueryãã©ã°ã¤ã³ï¼+ jQuery Easing Pluginï¼*/ 104 105// ããªã¬ã¼åå¾ 106$(function () { 107 // aimationå¼ã³åºã 108 // ãã¼ã¸å ã«.js-scroll-triggerãåå¨ãããå®è¡ 109 if ($('.scr-trigger').length) { 110 scrollAnimation(); 111 } 112 113 // aimation颿° 114 function scrollAnimation() { 115 $(window).scroll(function () { 116 $(".scr-trigger").each(function () { 117 let position = $(this).offset().top, 118 scroll = $(window).scrollTop(), 119 windowHeight = $(window).height(); 120 121 if (scroll > position - windowHeight + 0) { 122 $(this).addClass('is-active'); 123 } 124 }); 125 }); 126 } 127 $(window).trigger('scroll'); 128}); 129 130// 131 132 133/*fadeåºç¾*/ 134$(window).scroll(function(){ 135 var windowHeight = $(window).height(), 136 topWindow = $(window).scrollTop(); 137 $('.fade_box').each(function(){ 138 var targetPosition = $(this).offset().top; 139 if(topWindow > targetPosition - windowHeight - 150){ 140 $(this).removeClass("fade_box"); 141 } 142 }); 143}); 144 145/* curtain */ 146$(window).scroll(function(){ 147var b=$(window).height(), 148 a=$(window).scrollTop(); 149 $(".curtainIn").each(function(){ 150 var c=$(this).offset().top;if(a>c-b+150){ 151 $(this).addClass("ef-animation")} 152 })}); 153 154 155 156/*********************************************************************************************/ 157//accordion 158/**********************************************************************************************/ 159 160 161jQuery(function(){ 162 jQuery('.sec-Svs-Cptr__Ttl:first').addClass('selected');
163 jQuery('.sec-Svs-Qa__Ttl,.sec-Svs-Cptr__Ttl').click(function(){ 164 jQuery(this).toggleClass('selected'); 165 jQuery(this).next().slideToggle(); 166 }); 167}); 168 169 170jQuery(function(){ 171 jQuery('.toggle_title').click(function(){ 172 jQuery(this).toggleClass('selected'); 173 jQuery(this).next().slideToggle(); 174 }); 175}); 176 177 178 179 180 181 182 183/*********************************************************************************************/ 184// ã¹ããã®ã¿ããæ©è½ãhoverã«åããã (Jquery) â»è¨è¿°å¤ããã:hoverâ.hover 185/*********************************************************************************************/ 186(function () { 187 var tapClass = ""; 188 var hoverClass = ""; 189 var Hover = window.Hover = function (ele) { 190 return new Hover.fn.init(ele); 191 }; 192 Hover.fn = { 193 //Hover Instance 194 init : function (ele) { 195 this.prop = ele; 196 } 197 , bind : function (_hoverClass, _tapClass) { 198 hoverClass = _hoverClass; 199 tapClass = _tapClass; 200 $(window).bind("touchstart", function(event) { 201 var target = event.target || window.target; 202 var bindElement = null; 203 if (target.tagName == "A" || $(target).hasClass(tapClass)) { 204 bindElement = $(target); 205 } else if ($(target).parents("a").length > 0) { 206 bindElement = $(target).parents("a"); 207 } else if ($(target).parents("." + tapClass).length > 0) { 208 bindElement = $(target).parents("." + tapClass); 209 } 210 if (bindElement != null) { 211 Hover().touchstartHoverElement(bindElement); 212 } 213 }); 214 } 215 , touchstartHoverElement : function (bindElement) { 216 bindElement.addClass(hoverClass); 217 bindElement.unbind("touchmove", Hover().touchmoveHoverElement); 218 bindElement.bind("touchmove", Hover().touchmoveHoverElement); 219 bindElement.unbind("touchend", Hover().touchendHoverElement); 220 bindElement.bind("touchend", Hover().touchendHoverElement); 221 } 222 , touchmoveHoverElement : function (event) { 223 $(this).removeClass(hoverClass); 224 } 225 , touchendHoverElement : function (event) { 226 $(this).removeClass(hoverClass); 227 } 228 } 229 Hover.fn.init.prototype = Hover.fn; 230 Hover().bind("hover", "tap"); 231 } 232)(); 233 234 235/*********************************************************************************************/ 236// PageTop 237/*********************************************************************************************/ 238 239jQuery(function(){ 240 //ãã¿ã³[id:page-top]ãåºç¾ãããã¹ã¯ãã¼ã«ã¤ãã³ã 241 jQuery(window).scroll(function(){ 242 //æä¸é¨ããç¾å¨ä½ç½®ã¾ã§ã®è·é¢ãåå¾ãã¦ã夿°[now]ã«æ ¼ç´ 243 var now = jQuery(window).scrollTop(); 244 245 //æä¸é¨ããç¾å¨ä½ç½®ã¾ã§ã®è·é¢ãè¨ç®ãã¦ã夿°[under]ã«æ ¼ç´ 246 var under = jQuery('body').height() - (now + jQuery(window).height()); 247 248 //æä¸é¨ããç¾å¨ä½ç½®ã¾ã§ã®è·é¢(now)ã1500以ä¸ã㤠249 //æä¸é¨ããç¾å¨ä½ç½®ã¾ã§ã®è·é¢(under)ã200px以ä¸ã ã£ãã 250 if(now > 300){ 251 //[#page-top]ããã£ãããã§ã¼ãã¤ã³ãã 252 jQuery('#page-top').fadeIn('slow'); 253 //ãã以å¤ã ã£ãããã§ã¼ãã¢ã¦ããã 254 }else{ 255 jQuery('#page-top').fadeOut('slow'); 256 } 257 }); 258 259 //ãã¿ã³(id:move-page-top)ã®ã¯ãªãã¯ã¤ãã³ã 260 jQuery('#move-page-top').click(function(){ 261 //ãã¼ã¸ãããã¸ç§»åãã 262 jQuery('html,body').animate({scrollTop:0},'slow'); 263 }); 264}); 265 266 267 268/*********************************************************************************************/ 269// ã¹ããã§é²è¦§æã®ã¿é»è©±çªå·é©ç¨ 270/*********************************************************************************************/ 271 272$(function() { 273 $('.tel').each(function() { 274//.telå ã®HTMLãåå¾ 275 var str = $(this).html(); 276//åè¦ç´ ãimgã ã£ãå ´åãalt屿§ãåå¾ãã¦é»è©±çªå·ãªã³ã¯ã追å 277 if ($(this).children().is('img')) { 278 $(this).html($('<a>').attr('href', 'tel:' + $(this).children().attr('alt').replace(/-/g, '')).append(str + '</a>')); 279 } else { 280//ãã以å¤ã¯ããã¹ããåå¾ãã¦é»è©±çªå·ãªã³ã¯ã追å 281 $(this).html($('<a>').attr('href', 'tel:' + $(this).text().replace(/-/g, '')).append(str + '</a>')); 282 } 283 }); 284}); 285 286 287 288
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.