1"use strict"; 2 3/////////////////////////////////////////////////////// 4// variable 5/////////////////////////////////////////////////////// 6 7var $winH = $(window).height(); 8var $scrollTop = $(window).scrollTop(); 9var $winW = $(window).width(); 10 11/////////////////////////////////////////////////////// 12// jquery 13/////////////////////////////////////////////////////// 14 15$(function(){ 16 17/////////////////////////////////////////////////////// 18// action 19/////////////////////////////////////////////////////// 20 21// load 22/* 23setTimeout(function(){ 24 $("html").addClass("is-load"); 25},300); 26*/ 27// matchHeight 28// $(".c-lnav02-list-ttl").matchHeight(); 29 30 $('.l-header-ogis-nav .is-submenu').on('click', function(e) { 31 e.preventDefault() 32 if (!$(this).hasClass('is-actv')) { 33 $('.l-header-ogis-nav .is-actv').removeClass('is-actv') 34 $(this).addClass('is-actv') 35 if ($(window).width() >= 960) { 36 $('.l-header-sub-menu').fadeOut() 37 $(this).next('.l-header-sub-menu').fadeIn() 38 } else { 39 $('.l-header-sub-menu').slideUp() 40 $(this).next('.l-header-sub-menu').slideDown() 41 } 42 } else { 43 $(this).removeClass('is-actv') 44 if ($(window).width() >= 960) { 45 $(this).next('.l-header-sub-menu').fadeOut() 46 } else { 47 $(this).next('.l-header-sub-menu').slideUp() 48 } 49 } 50 }) 51 $('.l-header-sub-menu-close').on('click', function (e) { 52 e.preventDefault() 53 $(this).parent('.l-header-sub-menu').fadeOut() 54 $(this).parent('.l-header-sub-menu').prev('.is-submenu').removeClass('is-actv') 55 }) 56 57/* 58 const isBannerShow = sessionStorage.getItem('isBannerShow'); 59 if (isBannerShow === null) { 60 // ããã¼ãã£ã³ã°ããã¼ã表示ãããªãURL 61 // const ignoreBannerUrl = [ 62 // '/pickup/brms' 63 // ] 64 const ignoreBannerUrl = [ 65 '/pickup/brms/', 66 '/40th/', 67 ] 68 let isBannerIgnore = false 69 ignoreBannerUrl.forEach(function (url) { 70 if (location.pathname.match(url)) { 71 isBannerIgnore = true 72 } 73 }) 74 if (!isBannerIgnore) { 75 $('.l-footer').after('<div class="floating-banner"><a href="" class="floating-banner-close"></a><a href="/40th/"><img src="/_asset/_common/img/bnr-40_pc.jpg" class="u-tb-pc" alt=""><img src="/_asset/_common/img/bnr-40_sp.jpg" class="u-sp" alt=""></a></div>') 76 $('.floating-banner-close').on('click', function (e) { 77 e.preventDefault() 78 sessionStorage.setItem('isBannerShow', '1') 79 $('.floating-banner').fadeOut().remove() 80 }) 81 } 82 } 83*/ 84 85 $('.c-paging h2 a').on('click', function (e) { 86 e.preventDefault(); 87 const target = $(this).parents('h2').next('.c-paging-body'); 88 if ($(this).hasClass('js-on')) { 89 $(this).removeClass('js-on'); 90 target.slideUp(); 91 } else { 92 $(this).addClass('js-on'); 93 target.slideDown(); 94 } 95}); 96 97// objectFit 98objectFitImages(); 99 100// menu 101$(".l-header-ogis-menu-btn").on("click",function(){ 102 $(this).toggleClass("is-open"); 103 $(".l-header-ogis-nav").toggleClass("is-open"); 104 return false; 105}); 106 107// scroll top 108$(".l-footer-top-btn").on("click",function(){ 109 $("html,body").animate({ 110 scrollTop: 0 111 },300); 112 return false; 113}); 114 115// scroll anchor 116$('a[href^="#"]').not('a[href$="#"],.c-btn-acc,.c-tab-link a,.js-noscroll').on('click', function(e) { 117 e.preventDefault(); 118 119 var anc = $(this).attr('href'); 120 var hdr = $('.l-header').height(); 121 var tgt = $(anc).offset().top - hdr; 122 123 $('html,body').animate({scrollTop: tgt}, 500); 124}); 125 126// animation 127 128$(window).on('load scroll resize', function(){ 129 130 $scrollTop = $(window).scrollTop(); 131 $winH = $(window).height(); 132 $winW = $(window).width(); 133 134 addAnimationClass(".js-fade","is-anime",150,200); 135 addAnimationClass(".js-slide-side","is-anime",150,200); 136 addAnimationClass(".js-slide-vertical","is-anime",50,100); 137 addAnimationClass(".js-fade-list > *","is-anime",150,200); 138 addAnimationClass(".js-slide-side-list > *","is-anime",150,200); 139 addAnimationClass(".js-slide-vertical-list > *","is-anime",50,100); 140 addStepAnimationClass(".js-fade-list-step","is-anime",150,200);
141 addStepAnimationClass(".js-slide-side-list-step","is-anime",150,200); 142 addStepAnimationClass(".js-slide-vertical-list-step","is-anime",50,100); 143 144}); 145 146$('.c-article-list').each(function() { 147 if (!$(this).hasClass('c-article-list-all')) { 148 $(this).addClass('is-close'); 149 } 150}); 151 152$('.js-acc').each(function() { 153 $(this).addClass('is-close'); 154}); 155 156$('.c-btn-acc').on('click', function(e) { 157 e.preventDefault(); 158 159 var tgt = $(this).attr('href'); 160 var $this = $(this); 161 if ($(tgt).hasClass('is-close')) { 162 $(tgt).removeClass('is-close'); 163 $this.addClass('is-open'); 164 $this.text('éãã'); 165 } else { 166 $(tgt).addClass('is-close'); 167 $this.removeClass('is-open'); 168 $this.text('ããã«è¦ã'); 169 } 170}); 171 172$('.c-modal-trigger').on('click', function(e) { 173 e.preventDefault(); 174 175 var tgt = $(this).attr('href'); 176 $('.c-overlay').fadeIn(); 177 $(tgt).fadeIn(); 178 179 var th = $(tgt).height(); 180 var wh = window.innerHeight; 181 182 if (th > wh) { 183 $(tgt).addClass('c-modal-absolute'); 184 $(tgt).css('top', $(window).scrollTop() + 40 + 'px'); 185 } 186}); 187 188$('.c-modal-close a').on('click', function(e) { 189 e.preventDefault(); 190 191 $('.c-overlay').fadeOut(); 192 $('.c-modal').fadeOut(); 193}); 194 195$('.c-modal h3 input').on('change', function(e) { 196 var $this = $(this); 197 var tgt = $this.parent('h3').next('ul'); 198 if ($(this).prop('checked')) { 199 tgt.find('li').each(function() { 200 $(this).find('input').not('[disabled]').prop('checked', true); 201 }); 202 } else { 203 tgt.find('li').each(function() { 204 $(this).find('input').prop('checked', false); 205 }); 206 } 207}); 208 209$('.c-faq-a').hide(); 210 211$('.c-faq-q a').on('click', function(e) { 212 e.preventDefault(); 213 214 var $parent = $(this).parent('.c-faq-q'); 215 var $this = $(this); 216 var tgt = $parent.next('.c-faq-a'); 217 218 if (tgt.is(':visible')) { 219 tgt.slideUp(); 220 $this.removeClass('on'); 221 } else { 222 tgt.slideDown(); 223 $this.addClass('on'); 224 } 225}); 226 227$('.c-tab').not('.is-first').hide(); 228$('.c-tab-link a').on('click', function(e) { 229 e.preventDefault(); 230 231 if (!$(this).hasClass('is-actv')) { 232 var $this = $(this); 233 var tgt = $(this).attr('href'); 234 235 $('.c-tab-link .is-actv').removeClass('is-actv'); 236 $this.addClass('is-actv'); 237 238 $('.c-tab').fadeOut(); 239 $(tgt).fadeIn(); 240 } 241}); 242 243if ($(window).width() < 600) { 244 $('.c-tab-link').slick({ 245 slidesToShow: 2, 246 dots: false, 247 arrows: true, 248 infinite: false, 249 prevArrow: '<button type="button" class="c-slick-prev-btn"><img class="c-slick-arrow" src="/_asset/_common/img/btn_tab_prev.png" /></button>', 250 nextArrow: '<button type="button" class="c-slick-next-btn"><img class="c-slick-arrow" src="/_asset/_common/img/btn_tab_next.png" /></button>' 251 }); 252 $('.c-tab-link a').matchHeight(); 253} 254 255$('.l-header-ogis-search-btn,.l-header-corp-nav-search').on('click', function(e) { 256 e.preventDefault(); 257 var $this = $(this); 258 var tgt = $('.l-header-ogis-search'); 259 if (tgt.is(':visible')) { 260 $this.removeClass('on'); 261 tgt.slideUp('fast'); 262 } else { 263 $this.addClass('on'); 264 tgt.slideDown('fast'); 265 $('.iSearchAssist').focus(); 266 } 267}); 268 269$('.l-main, .l-footer').on('click', function() { 270 const tgt = $('.l-header-ogis-search'); 271 if (tgt.is(':visible')) { 272 $('.l-header-ogis-search-btn, .l-header-corp-nav-search').removeClass('on'); 273 tgt.slideUp('fast'); 274 } 275}); 276 277$('head').append('<meta name="format-detection" content="telephone=no">'); 278 279});//jQuery 280 281 282/////////////////////////////////////////////////////// 283// function 284/////////////////////////////////////////////////////// 285 286// animation 287 288// ç»é¢å ã«å ¥ã£ã¦ããã¢ãã¡ã¼ã·ã§ã³ï¼ã¯ã©ã¹ä»ä¸ï¼ 289function addAnimationClass($obj,$class,$marginsp,$marginpc) { 290 291 if($($obj).length > 0){ 292 293 $($obj).each(function(){ 294 if(!$marginpc) { 295 $marginpc = $marginsp; 296 } 297 if($winW >= 769) { 298 $marginsp = $marginpc; 299 } 300 var $thisY = $(this).offset().top; 301 if($winH + $scrollTop > $thisY + $marginsp) { 302 $(this).addClass($class); 303 }
304 // if($winH + $scrollTop < $thisY - 10) { 305 // $(this).removeClass($class); 306 // } 307 }); 308 309 } 310 311 312} 313 314// ç»é¢å ã«å ¥ã£ã¦ããæéå·®ã¢ãã¡ã¼ã·ã§ã³ï¼ã¯ã©ã¹ä»ä¸ï¼ 315function addStepAnimationClass($obj,$class,$marginsp,$marginpc) { 316 317 if($($obj).length > 0){ 318 319 $($obj).each(function(){ 320 321 var $index = 0; 322 var $delay = .2; 323 324 if(!$marginpc) { 325 $marginpc = $marginsp; 326 } 327 if($winW >= 769) { 328 $marginsp = $marginpc; 329 } 330 331 var $thisY = $(this).offset().top; 332 333 if($winH + $scrollTop > $thisY + $marginsp) { 334 $(this).find(".js-step-item").each(function(){ 335 $(this).addClass($class); 336 $(this).css({transition: ".7s "+ $delay * $index + "s"}); 337 $index++; 338 }); 339 } 340 // if($winH + $scrollTop < $thisY - 50) { 341 // $(this).find(".js-step-item").each(function(){ 342 // $(this).removeClass($class); 343 // $(this).css({transition: "none"}); 344 // }); 345 // } 346 347 }); 348 349 } 350 351}
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.