1// ãã¼ãã¼ãããã¼ã100vhã®ã¹ããå¯¾å¿ 2function setHeight() { 3 let vh = window.innerHeight * 0.01; 4 document.documentElement.style.setProperty('--vh', `${vh}px`); 5} 6setHeight(); 7// ãã©ã¦ã¶ã®ãµã¤ãºã夿´ãããæã»ç»é¢ã®åããå¤ããæã«åè¨ç®ãã 8// â»ãã©ã¦ã¶ã®ããã²ã¼ã·ã§ã³ã®è¡¨ç¤ºåãæ¿ãã«ãåå¿ãã¦ãã¾ããããéå¸¸ã¯æ©è½OFF 9// window.addEventListener('resize', setHeight); 10 11 12var menuState = false; 13var dropState = false; 14 15$(document).ready(function() { 16 // åæå 17 sNavOut('.header__nav'); 18 19 // ã¹ã©ã¤ãã¼ï¼slickï¼ 20 if($('.mainSlider').length){ 21 $('.mainSlider').slick({ 22 dots: true, 23 arrow: true, 24 infinite: true, 25 slidesToShow: 1, 26 slidesToScroll: 1, 27 autoplay: true, 28 autoplaySpeed: 5000, 29 lazyLoad: 'progressive', 30 }); 31 }else{ 32 33 } 34 if($('.contentsSlider').length){ 35 $('.contentsSlider').each(function() { 36 37 var pcshow = $(this).data('pcshow') ? $(this).data('pcshow') : 4; 38 var pcscroll = $(this).data('pcscroll') ? $(this).data('pcscroll') : 4; 39 var spshow = $(this).data('spshow') ? $(this).data('spshow') : 2; 40 var spscroll = $(this).data('spscroll') ? $(this).data('spscroll') : 2; 41 var infinite = true; 42 if($(this).hasClass('itemList--ranking')){infinite = false;} 43 $(this).slick({ 44 dots: true, 45 arrow: true, 46 infinite: infinite, 47 lazyLoad: 'progressive', 48 slidesToShow: pcshow, 49 slidesToScroll: pcscroll, 50 autoplay: true, 51 autoplaySpeed: 5000, 52 speed:150, 53 swipeToSlide:true, 54 responsive: [{ 55 breakpoint: 991, //ãã¬ã¤ã¯ãã¤ã³ããæå® 56 settings: { 57 slidesToShow: 3, 58 slidesToScroll: 3, 59 }, 60 breakpoint: 768, 61 settings: { 62 slidesToShow: spshow, 63 slidesToScroll: spscroll, 64 } 65 }] 66 }); 67 }); 68 } 69 if($('.mainSlider--typeB').length){ 70 var slider = ".mainSlider--typeB"; // ã¹ã©ã¤ãã¼ 71 var thumbnailItem = ".msThumbnail .msThumbnail__item"; // ãµã ãã¤ã«ç»åã¢ã¤ãã 72 73 // ãµã ãã¤ã«ç»åã¢ã¤ãã ã« data-index ã§indexçªå·ãä»ä¸ 74 $(thumbnailItem).each(function(){ 75 var index = $(thumbnailItem).index(this); 76 $(this).attr("data-index",index); 77 }); 78 79 // ã¹ã©ã¤ãã¼åæåå¾ãã«ã¬ã³ãã®ãµã ãã¤ã«ç»åã«ã¯ã©ã¹ãthumbnail-currentããä»ãã 80 // ãslickã¹ã©ã¤ãã¼ä½æãã®åã«ãã®è¨è¿°ã¯æ¸ãã¦ãã ããã 81 $(slider).on('init',function(slick){ 82 var index = $(".slide-item.slick-slide.slick-current").attr("data-slick-index"); 83 $(thumbnailItem+'[data-index="'+index+'"]').addClass("thumbnail-current"); 84 }); 85 86 //slickã¹ã©ã¤ãã¼åæå 87 $(slider).slick({ 88 autoplay: true, 89 arrows: true, 90 infinite: true, 91 }); 92 //ãµã ãã¤ã«ç»åã¢ã¤ãã ãã¯ãªãã¯ããã¨ãã«ã¹ã©ã¤ãã¼åãæ¿ã 93 $(thumbnailItem).on('click',function(){ 94 var index = $(this).attr("data-index"); 95 $(slider).slick("slickGoTo",index,false); 96 }); 97 98 //ãµã ãã¤ã«ç»åã®ã«ã¬ã³ããåãæ¿ã 99 $(slider).on('beforeChange',function(event,slick, currentSlide,nextSlide){ 100 $(thumbnailItem).each(function(){ 101 $(this).removeClass("thumbnail-current"); 102 }); 103 $(thumbnailItem+'[data-index="'+nextSlide+'"]').addClass("thumbnail-current"); 104 }); 105 } 106 107 if($('.mainVisual--integrate').length && $('.hdr--integrate').length){ 108 $('.hdr--integrate').addClass('active'); 109 $(window).on('scroll', function(event) { 110 var scroll = $(window).scrollTop(); 111 if (scroll > 300 ){ 112 $('.hdr--integrate').addClass('integrate--fixed'); 113 }else{ 114 $('.hdr--integrate').removeClass('integrate--fixed'); 115 } 116 }); 117 118 } 119 120}); 121 122// ãã³ãã¼ã¬ã¼ã¡ãã¥ã¼å±é 123$(document).on('click', '.menuToggle', function() { 124 $('#drawer').toggleClass('open'); 125 $('#overlay').toggleClass('open'); 126 $('body').toggleClass('open'); 127 return false; 128}); 129 130$(document).on('click', '.menuClose', function() { 131 $('#drawer').removeClass('open'); 132 $('#overlay').removeClass('open'); 133 $('body').removeClass('open'); 134 return false; 135}); 136 137// SPã®ã¿ã¢ã³ã¼ãã£ãªã³ 138$(document).on('click', '.sp-toggle', function() { 139 var windowWidth = $(window).width(); 140 if (windowWidth < 768) { 141 $(this).next('ul').slideToggle(); 142 $(this).toggleClass('open'); 143 } 144}); 145 146$(document).on('click', '.hdrSearch--toggle > span,.hdrSearch--toggle > a', function() { 147 $(this).next().slideToggle(); 148 if($(this).find('.material-icons').text() == 'search'){ 149 $(this).find('.material-icons').text('close'); 150 }else if($(this).find('.material-icons').text() == 'close'){ 151 $(this).find('.material-icons').text('search'); 152 } 153 return false; 154}); 155 156 157// ããã²ã¼ã·ã§ã³ãåè¦ç´ å±é 158$(function() { 159 var ua = navigator.userAgent; 160 // ã¿ãã¬ããã»ã¹ãã¼ããã©ã³æ 161 if ((ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0) && ua.indexOf('Mobile') > 0||ua.indexOf('iPad') > 0) { 162 $('.hasChildren > a').on('mouseenter touchstart', function(){ 163 $(this).toggleClass('open'); 164 $(this).next('ul,.megaMenu').toggleClass('open'); 165 return false; 166 }).on('mouseleave touchend', function(){ 167 return false; 168 });
169 $('.hasChildren .hasChildren--close > a').on('mouseenter touchstart', function(){ 170 $(this).parents('ul').removeClass('open').prev('a').removeClass('open'); 171 return false; 172 }); 173 174 }else{ 175 // PCæ 176 $('.hasChildren').hover(function() { 177 $(this).children('a').addClass('open'); 178 $(this).children('ul,.megaMenu').addClass('open'); 179 }, function() { 180 $(this).children('a').removeClass('open'); 181 $(this).children('ul,.megaMenu').removeClass('open'); 182 }); 183 } 184}); 185 186$(document).on('click', '.hasChildren--click > a,.hasChildren--click > span', function() { 187 if (dropState == false) { 188 $(this).addClass('open'); 189 $(this).next('ul').addClass('open'); 190 $(this).next('ul').slideDown(); 191 dropState = true; 192 } else { 193 if ($(this).hasClass('open')) { 194 $(this).removeClass('open'); 195 $(this).next('ul').removeClass('open'); 196 $(this).next('ul').slideUp(); 197 } else { 198 $(this).parents('li').parents('ul').parents('.gNav').find('.hasChilds > span').removeClass('open'); 199 $(this).parents('li').parents('ul').parents('.gNav').find('.hasChilds > span').next('ul').removeClass('open'); 200 $(this).parents('li').parents('ul').parents('.gNav').find('.hasChilds > span').next('ul').slideUp(0); 201 $(this).addClass('open'); 202 $(this).next('ul').addClass('open'); 203 $(this).next('ul').slideDown(); 204 } 205 } 206 return false; 207}); 208 209// SPãããã¼Dãã«ãã´ãªã¼ãã 210$(document).on('click', '.hdrCatMenu--toggle', function() { 211 if($(this).hasClass('open')){ 212 $(this).removeClass('open'); 213 $(this).next('ul').removeClass('open'); 214 $(this).next('ul').slideUp(); 215 }else{ 216 $('.hdrCatMenu--toggle.open').next('ul').hide(); 217 $('.hdrCatMenu--toggle.open').next('ul').removeClass('open'); 218 $('.hdrCatMenu--toggle.open').removeClass('open'); 219 $(this).addClass('open'); 220 $(this).next('ul').addClass('open'); 221 $(this).next('ul').slideDown(); 222 } 223 return false; 224}); 225 226 227// ããåºå® 228$(function() { 229 // å ±é 230 if($(".hdrFixed").length){ 231 hdrFixed($(".hdrFixed")); 232 }else{ 233 var ua = navigator.userAgent; 234 // ã¿ãã¬ããã»ã¹ãã¼ããã©ã³æ 235 if ((ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0) && ua.indexOf('Mobile') > 0||ua.indexOf('iPad') > 0) { 236 if($(".hdrFixed--sp").length){ 237 hdrFixed($(".hdrFixed--sp")); 238 } 239 // PC 240 }else{ 241 if($(".hdrFixed--pc").length){ 242 hdrFixed($(".hdrFixed--pc")); 243 } 244 } 245 } 246 247 function hdrFixed(target){ 248 target.after('<div class="h_box"></div>'); 249 var h = target.height(); 250 var h_top = target.offset().top; 251 $(".h_box").height("0"); 252 $(window).on('load scroll resize', function(event) { 253 var scroll = $(window).scrollTop(); 254 if (scroll >= h_top) { 255 target.css({ 256 position: 'fixed', 257 top: '0px', 258 width: '100%', 259 'z-index': '998' 260 }); 261 $(".h_box").height(h); 262 } else { 263 target.css({ 264 position: '' 265 }); 266 $(".h_box").height("0"); 267 } 268 }); 269 } 270}); 271 272 273function sNavIn(_this) { 274 var windowWidthMinus = document.documentElement.clientWidth * -1; 275 $(_this).addClass('open'); 276 $('.menuBg--close').addClass('open'); 277 $(_this).css({ 278 'left': 0 279 }); 280} 281 282function sNavOut(_this) { 283 var windowWidthMinus = document.documentElement.clientWidth * -1; 284 $(_this).removeClass('open'); 285 $('.menuBg--close').removeClass('open'); 286 $(_this).css({ 287 'left': windowWidthMinus 288 }); 289} 290 291// ã¿ãåãæ¿ã 292$(function() { 293 $(".tabSwitch > li ").click(function() { 294 if (!$(this).hasClass('active')) { 295 $(this).parents('.tabSwitch').find('li').removeClass('active'); 296 $(this).addClass('active'); 297 298 var tabNum = $(this).index(); 299 $(this).parents(".tab").find(".tabContents").find(".tabContent").hide(); 300 $(this).parents(".tab").find(".tabContents").find(".tabContent").eq(tabNum).fadeIn("500"); 301 } 302 }); 303}); 304 305// ã¹ã¯ãã¼ã«ãã¿ã³ 306$(function() { 307 if ($('.mainSliderSec').length || $('.mainVisual').length) { 308 if($('.mainVisual--hero').length){ 309 var position = $(window).height(); 310 }else if ($('.mainSliderSec').length) { 311 var position = $(".mainSliderSec + * ").offset().top; 312 }else{ 313 var position = $(".mainVisual + * ").offset().top; 314 } 315 $("#scrollBtn").click(function() { 316 $("html,body").animate({ 317 scrollTop: position // ãã£ã夿°ã«å ¥ããä½ç½®ã¾ã§ 318 }, { 319 queue: false // ã©ããããçµéãã¦ãããã¢ãã¡ã¼ã·ã§ã³ãå§ãããããã¥ã¼[å¾ ã¡è¡å]ãfalseãæå®ããã¨ããã¥ã¼ã«è¿½å ãããã«å³åº§ã«ã¢ãã¡ã¼ã·ã§ã³ãå®è¡ã 320 }); 321 return false; 322 });
323 } 324}); 325 326// TOPã«æ»ããã¿ã³ 327$(function(){ 328 if($('#toTop').length){ 329 var topBtn = $('#toTop'); 330 topBtn.hide(); 331 332 //ã¹ã¯ãã¼ã«ã100ã«éããããã¿ã³è¡¨ç¤º 333 $(window).scroll(function () { 334 var w = $(window).width(); 335 if ($(this).scrollTop() > 800) { 336 topBtn.fadeIn(); 337 } else { 338 topBtn.fadeOut(); 339 } 340 }); 341 342 //ã¹ã ã¼ã¹ã¹ã¯ãã¼ã«ã§ãã¼ã¸ããã㸠343 topBtn.click(function () { 344 $('body,html').animate({ 345 scrollTop: 0 346 }, 500); 347 return false; 348 }); 349 } 350}); 351 352// æ¤ç´¢ã©ã³ãã³ã°ãã¼ã¯ã¼ã 353$(function() { 354 // ããã¹ãããã¯ã¹ã«ãã©ã¼ã«ã¹æããã©ã¼ã ã®èæ¯è²ãå¤å 355 $('.keywordRanking input[type="text"]') 356 .focusin(function(e) { 357 $(this).parents('.keywordRanking').next('.keywordRanking__toggle').addClass('open'); 358 }) 359 .focusout(function(e) { 360 setTimeout(function(){ 361 $('.keywordRanking__toggle.open').removeClass('open'); 362 console.log($('.keywordRanking__toggle.open')); 363 },200); 364 }); 365}); 366 367// ããã¹ã横ã¹ã¯ãã¼ã« 368var spSwiperDone = false; 369$(window).on('load resize', function(event) { 370 if (window.innerWidth < 992 && spSwiperDone == false && $(".spSwiper").length) { 371 $('.spSwiper').slick({ 372 autoplay: false, 373 speed: 300, 374 slidesToShow: 1, 375 slidesToScroll: 1, 376 centerMode: false, 377 variableWidth: true, 378 touchMove: true, 379 swipeToSlide: true, 380 infinite: false 381 }); 382 383 spSwiperDone= true; 384 } 385}); 386 387if($(".wow").length){ 388 $(window).on('scroll',function(){ 389 $(".wow").each(function(){ 390 var position = $(this).offset().top; 391 var height = $(this).height(); 392 var scroll = $(window).scrollTop(); 393 var windowHeight = $(window).height(); 394 if (scroll > position - windowHeight + windowHeight / 4 ){ 395 $(this).addClass('animated'); 396 } 397 }); 398 }); 399} 400 401if (window.innerWidth < 767) { 402 $(".cateList__hasChildren").click(function() { 403 $(this).toggleClass('open').next().toggleClass('open').slideToggle(); 404 return false; 405 }); 406} 407 408// 詳細æ¤ç´¢ã¢ã¼ãã« 409$(document).on('click', '#mdsBg,#mdsClose', function() { 410 $("#modalDetailSearch").removeClass('open'); 411 return false; 412}); 413 414$(document).on('click', '#openDetailSearch', function() { 415 $("#modalDetailSearch").addClass('open'); 416 return false; 417}); 418 419 420// ï¼ï¼ï¼ï¼ï¼ï¼ï¼ 421// CMSåºæ 422// ï¼ï¼ï¼ï¼ï¼ï¼ï¼ 423 424// ã³ãã¯ãªã®ååã«ã«ã¼ã»ã«è§£é¤ 425// if($(".wow").length){ 426// $('.fs-c-productListCarousel__list__itemTrack').each(function() { 427// // åå表示ãã¼ãã®ã¯ã©ã¹ãä»ä¸ 428// $(this).addClass('itemList itemList--typeC itemList-pc--4 itemList-sp--2'); 429// $(this).parents('.fs-c-productListCarousel__list').removeClass('fs-c-productListCarousel__list').addClass('ccItemListContainer'); 430// $(this).removeClass('fs-c-productListCarousel__list__itemTrack'); 431// $(this).find('article.fs-c-productListCarousel__list__item.fs-c-productListItem').each(function() { 432// $(this).removeClass('fs-c-productListCarousel__list__item fs-c-productListItem').addClass('itemList__unit'); 433// // ååå 434// var name = $(this).find('.fs-c-productListItem__productName .fs-c-productName__name').text(); 435// // ç»åãdataLazyããæ½åºãã¦ãã¼ã¹ 436// var dataLazy = ''; 437// var img = ''; 438// $(this).find('img.fs-c-productImage__image').each(function() { 439// dataLazy = $(this).attr('data-lazy'); 440// $(this).attr('src', dataLazy); 441// }); 442// if (dataLazy != '') { 443// img = '<img src="' + dataLazy + '" alt="' + name + '" class="itemImg" />'; 444// } 445// // ååURL 446// var url = $(this).find('.fs-c-productListItem__productName a').attr('href'); 447// // ä¾¡æ ¼ 448// var price = $(this).find('.fs-c-productListItem__prices.fs-c-productPrices').html(); 449// // å¨åº«è¡¨ç¤º 450// var stockClass = $(this).find('.fs-c-productListItem__lowInStock.fs-c-productListItem__notice.fs-c-productStock').attr('class'); 451// console.log(stockClass); 452// var stock = $(this).find('.fs-c-productListItem__lowInStock.fs-c-productListItem__notice.fs-c-productStock').html();
453// if (stock != undefined) { 454// stock = '<div class="' + stockClass + '">' + stock + '</div>'; 455// } else { 456// stock = ''; 457// } 458// // ãã¿ã³ï¼ãæ°ã«å ¥ã 459// var btn = $(this).find('.fs-c-productListItem__control.fs-c-buttonContainer'); 460// // ãã¼ã¹ 461// var html = '<a class="itemWrap" href="' + url + '">' + img + '<p class="itemName">' + name + '</p>' + price + stock + '</a>'; 462// 463// $(this).html(html); 464// 465// $('.fs-c-productListCarousel__ctrl').hide(); 466// }); 467// 468// $('.fs-c-button--carousel').hide(); 469// }); 470 471// ã¯ãªã¢æ¤ç´¢ã¨ã³ã¿ã¼ 472$('.search-keyword').on('keypress', function(e) { 473 if (e.keyCode == 13) { 474 var index = $('.search-keyword').index(this); 475 $('.search-url')[index].click(); 476 } 477}); 478 479// ã¯ãªã¢ã«ã¬ã³ãã¼ 480$(function(){ 481 $('.dayList').each(function(){ 482 var month = $(this).attr('data-month'); 483 var day = $(this).attr('data-day'); 484 var color = $(this).attr('data-color');
485 $('.makeshop-calendar' + month +' .day' + day).css({ 486 'background-color': color, 487 'color': '#fff', 488 'font-weight': 'bold' 489 }); 490 }); 491}); 492 493 494 495// _creatorMode Cart 496$('#cp_toggle01_bg').on('click', function() { 497 console.log('a'); 498 if($('#cp_toggle01').prop('checked')){ 499 $('#cp_toggle01').prop('checked', false); 500 } 501 if($('#cp_toggle04').prop('checked')){ 502 $('#cp_toggle04').prop('checked', false); 503 } 504}); 505$('.cp_toggle04').on('click', function() { 506 if ($('#cp_toggle01').prop('checked')) { 507 $('#cp_toggle01').prop('checked', false); 508 } 509}); 510 511$('.cp_toggle01').on('click', function() { 512 if ($('#cp_toggle04').prop('checked')) { 513 $('#cp_toggle04').prop('checked', false); 514 } 515}); 516 517function updateCart(data) 518{ 519 // è²·ãç©ã«ã´ã®ååæ°ãæ´æ° 520 var quantity = getCartQuantity(data.totalQuantity); 521 $('.cartAmount', parent.document).html(quantity); 522 523 // è²·ãç©ã«ã´ããªãã¼ã 524 var url = $('.cart-object', parent.document).attr('data'); 525 $('.cart-object', parent.document).attr('data', url); 526} 527 528// è²·ãç©ã«ã´ã®ååæ°ãåå¾ããï¼åå詳細ãã¼ã¸ã§ãå©ç¨ï¼ 529function getCartQuantity(totalQuantity) 530{ 531 var quantity = ''; 532 533 if (totalQuantity == 0) { 534 quantity = ''; 535 } else if (totalQuantity < 100) { 536 quantity = totalQuantity; 537 } else { 538 quantity = '99+'; 539 } 540 541 return quantity; 542} 543 544$(function() { 545 if($('#catepage-page-common-search-data').length){
546 initCustomSearchForm($('#catepage-page-common-search-data')); 547 } 548 if($('#side-page-common-search-data').length){ 549 initCustomSearchForm($('#side-page-common-search-data')); 550 } 551 if($('#drawer-page-common-search-data').length){ 552 initCustomSearchForm($('#drawer-page-common-search-data')); 553 } 554}); 555 556function initCustomSearchForm(pageData) 557{ 558 var searchUrl = pageData.attr('data-search-url'); 559 var keywordId = pageData.attr('data-id-keyword'); 560 var priceLowId = pageData.attr('data-id-price-low'); 561 var priceHighId = pageData.attr('data-id-price-high'); 562 var categoryId = pageData.attr('data-id-category'); 563 var originalCodeId = pageData.attr('data-id-original-code'); 564 565 $('[href="' + searchUrl + '"]').on('click', function() { 566 var index = $('[href="' + searchUrl + '"]').index(this); 567 var keyword = getFormValue(keywordId, index); 568 var priceLow = getFormValue(priceLowId, index); 569 var priceHigh = getFormValue(priceHighId, index); 570 var category = getFormValue(categoryId, index); 571 var originalCode = getFormValue(originalCodeId, index); 572 573 $.ajax({
574 url: '/shop/shopsearch_url.html', 575 type: 'POST', 576 data: JSON.stringify({ 577 'keyword': keyword, 578 'price_low': priceLow, 579 'price_high': priceHigh, 580 'category': category, 581 'original_code': originalCode 582 }), 583 contentType: 'application/json', 584 dataType: 'json' 585 }).done(function(data) { 586 if (!data.result) { 587 openModalMessage(data.error.message); 588 return; 589 } 590 location.href = data.url; 591 }); 592 593 return false; 594 }); 595} 596 597function getFormValue(dataId, index) 598{ 599 var result = $('[data-id="' + dataId + '"]').eq(index).val(); 600 return (result === undefined) ? '' : result; 601} 602 603 $(document).ready(function(){ 604 // WPã®URL 605 var url = "https://kame2503.xsrv.jp/blog"; 606 607 $.ajax({ 608 url: url+'/new-wp/?device=pc', 609 type: 'GET', 610 cache: false, 611 success: function(res) { 612 if(res.responseText){ 613 content = $(res.responseText); 614 }else{ 615 content = $(res); 616 } 617 $(".js-articleContent").html(content); 618 } 619 }); 620 621 });
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.