PageSourceSearch

https://www.y-style.store/view/asset/user-4-1-2-84362576a6dd7184ef353c004d80cfdc.js

js y-style.store collected 2026-10-04 04:34:52 UTC 19,105 bytes, 728 lines download raw bytes

1$(function() {
2    // ヘッダーのサイズ調整
3    headerAdjust();
4    $(window).on('scroll', function() {
5        headerAdjust();
6    });
7
8    // カレンダー特定日の設定
9    $('.day-list').each(function() {
10        var month = $(this).attr('data-month');
11        var day = $(this).attr('data-day');
12        var color = $(this).attr('data-color');
13
14        $('.makeshop-calendar' + month +' .day' + day).css({
15            'background-color': color,
16            'color': '#fff',
17            'font-weight': 'bold',
18            'height': '14px'
19        });
20    });
21
22    // 検索フォーム
23    $('.search-keyword, .search-price, .original-code').on('keypress', function(e) {
24        if (e.keyCode == 13) {
25            $('.search-url')[0].click();
26        }
27    });
28
29    // ハンバーガーメニュー
30    $('.openbtn').on('click', function() {
31        $(this).toggleClass('active');
32        $('#g-nav').toggleClass('panelactive');
33    });
34
35    // サイドメニューを閉じる
36    $('#g-nav a').on('click', function() {
37        $('.openbtn').removeClass('active');
38        $('#g-nav').removeClass('panelactive');
39    });
40
41    // サイドメニューのカテゴリー開閉
42    $('.accordion').on('click', function() {
43        $(this).toggleClass('on').next().slideToggle();
44        $('.accordion').not(this).removeClass('on').next('.close').slideUp();
45    });
46});
47
48function headerAdjust() {
49    var adjustPoint = 20;
50    var scrollTop = $(window).scrollTop();
51    if(scrollTop > adjustPoint) {
52        $('.header').addClass('fix');
53    } else {
54        $('.header').removeClass('fix');
55    }
56}
57
58function MakeShop_afterListCartEntry(data){
59    if (!data.result) {
60        data.method.modal(data.error.message, function() {
61            location.href = '/view/item/' + data.systemCode;
62        });
63
64        return false;
65    }
66}
67
68
69//ここから
70//base
71$(document).on('ready', function() {
72  $(".js-favorite-slider").slick({
73    autoplay: false,
74    autoplaySpeed: 3000,
75    arrows: true,
76    dots: false,
77    infinite: true,
78    slidesToShow: 4,
79    slidesToScroll: 1,
80    responsive: [
81    {
82      breakpoint: 1030,
83      settings: {
84        slidesToShow: 3,
85        slidesToScroll: 1,
86      }
87    },
88    {
89      breakpoint: 768,
90      settings: {
91        slidesToShow: 2,
92        slidesToScroll: 1,
93      }
94    }
95    ]
96  });
97  $(".js-side-slider").slick({
98    autoplay: true,
99    autoplaySpeed: 3000,
100    fade: true,
101    speed: 1500,
102    arrows: false,
103    dots: true,
104    infinite: true,
105    slidesToShow: 1,
106    slidesToScroll: 1,
107    responsive: [
108    {
109      breakpoint: 1024,
110      settings: {
111        fade: false,
112        slidesToShow: 2,
113        slidesToScroll: 1,
114      }
115    },
116    {
117      breakpoint: 768,
118      settings: {
119        slidesToShow: 1,
120        slidesToScroll: 1,
121      }
122    }
123    ]
124  });
125});
126function smoothScroll(selector){
127  jQuery("body,html").animate({
128    scrollTop:jQuery(selector).offset().top
129  },800,"swing");
130}
131
132function lerp(x,y,a){
133  return x+(y-x)*a;
134}
135function isPC(){
136  return (jQuery(window).width() > 767);
137}
138function easeOut(t,p){
139  return 1-Math.pow((1-t),p);
140}
141function clamp01(n){
142  return Math.min(Math.max(n,0),1);
143}
144function randomDelta(n,p){
145  return n - (n*p*0.5) + (n*Math.random()*p);
146}
147
148
149
150//トグルボタン
151$(window).on('load resize',function() {
152  if(isPC()){
153    $(".js-toggle-contents").fadeOut("fast");
154    $(".js-toggle-btn").removeClass("is-on");
155    $(".l-main-navi__overlay").fadeOut("fast");
156  }
157  toggleBtn();
158});
159function toggleBtn() {
160  $(".js-toggle-btn").off("click");
161  $(".js-toggle-btn").on("click",function() {
162    if(isPC()){
163      if ($(this).hasClass("is-on")) {
164        $(this).removeClass("is-on");
165        $(this).next(".js-toggle-contents").fadeOut("fast");
166        $(".l-main-navi__overlay").fadeOut("fast");
167      } else {
168        $(".js-toggle-btn").removeClass("is-on");
169        $(".js-toggle-btn").next().fadeOut("fast");
170        $(this).addClass("is-on");
171        $(this).next(".js-toggle-contents").fadeIn("fast");
172        $(".l-main-navi__overlay").fadeOut("fast");
173        $(".l-main-navi__overlay").fadeIn("fast");
174      }
175    } else {
176      $(this).toggleClass("is-on");
177      $(this).next(".js-toggle-contents").slideToggle("fast");
178    }
179  });
180}
181
182$(".l-main-navi__overlay").on("click",function() {
183  $(this).fadeOut();
184  $(".js-toggle-btn").removeClass("is-on");
185  $(".js-toggle-contents").fadeOut("fast");
186  $(".js-search-contents").removeClass("is-on");
187});
188
189
190
191//検索ボタン
192$(document).ready(function() {
193  $(".js-search-btn").on('click',function() {
194    $(".js-toggle-contents").fadeOut();
195    $(".js-toggle-btn").removeClass("is-on");
196    $(".js-navi-open").removeClass("is-on");
197    $(".js-search-contents").addClass("is-on");
198    $(".l-header-search__overlay").fadeIn("fast");
199    $('.l-header-search__input input[type="text"]').focus();
200    $(".l-main-navi__overlay").fadeOut("fast");
201  });
202  $(".l-header-search__overlay").on('click',function() {
203    $(".l-header-search__overlay").fadeOut("fast");
204    $(".js-search-contents").removeClass("is-on");
205  });
206});
207
208
209
210//SP hamburger
211$(document).ready(function() {
212  $(".js-navi-open").on('click',function() {
213    $(".l-header-search__contents").removeClass("is-on");
214    $(".l-header-search__btn").removeClass("is-on");
215    $(".l-header").toggleClass("is-open");
216    $(".l-main-navi").toggleClass("is-open");
217    $(".l-menu-btn").toggleClass("is-on");
218    $(".l-sp-main-navi__overlay").toggleClass("is-on");
219  });
220});
221
222//サイドカテゴリー
223$(document).ready(function() {
224  $(".js-side-toggle__btn").on('click',function() {
225    $(this).toggleClass("is-open")
226    $(this).next(".js-side-toggle__contents").slideToggle("400");
227  });
228});
229
230//スクロールヘッダー
231$(document).ready(function() {
232  $(window).on("load scroll", function() {
233    var value = $(this).scrollTop();
234    if ( value > 0) {
235      $(".l-header").addClass("is-fixed");
236    } else {
237      $(".l-header").removeClass("is-fixed");
238    }
239  });
240});
241
242const header = document.getElementById("js-header-scroll");
243const hH = header.clientHeight;
244const winH = window.innerHeight;
245const docH = document.documentElement.scrollHeight;
246const windBtm = docH - winH;
247
248let pos = 0;
249let lastPos = 0;
250
251const onScroll = function () {
252  if (pos > hH && pos > lastPos) {
253    header.classList.add("is-unpinned");
254    $(".js-toggle-btn").removeClass("is-on");
255    $(".js-toggle-btn").next().fadeOut();
256    $(".js-toggle-contents").fadeOut();
257    $(".js-search-contents").removeClass("is-on");
258    $(".l-header-search__overlay").fadeOut();
259    $(".l-main-navi__overlay").fadeOut();
260    $(".js-navi-open").removeClass("is-on");
261    $(".l-main-navi").removeClass("is-open");
262    $(".l-sp-main-navi__overlay").removeClass("is-on");
263  }
264  if (pos < hH || pos < lastPos || windBtm <= pos) {
265    header.classList.remove("is-unpinned");
266  }
267  lastPos = pos;
268};
269
270window.addEventListener("scroll", function () {
271  pos = window.scrollY;
272  onScroll();
273});
274
275
276// スクロール終了時に発火
277var timeoutId ;
278
279window.addEventListener("scroll", function() {
280  clearTimeout( timeoutId ) ;
281  timeoutId = setTimeout(function() {
282    $(".l-header").removeClass("is-unpinned");
283  }, 3000);
284});
285
286// 商品一覧のソートを切り替える
287(function () {
288  $('.js-sort-switch').on('change', function () {
289    location.href = $(this).val();
290  });
291}());
292
293$(document).ready(function() {
294  $(".js-matchHeight").matchHeight();
295});
296
297
298
299document.addEventListener('DOMContentLoaded', function () {
300  const buttons = document.querySelectorAll('.p-group-button');
301  const contents = document.querySelectorAll('.p-group-content');
302
303  buttons.forEach(button => {
304    button.addEventListener('click', function (event) {
305      event.preventDefault();
306      const contentToShow = this.getAttribute('data-content');
307
308      contents.forEach(content => {
309        if (content.getAttribute('data-content') === contentToShow) {
310          content.style.display = 'flex';
311        } else {
312          content.style.display = 'none';
313        }
314      });
315    });
316  });
317});
318
319
320document.querySelectorAll('.p-group-button').forEach(button => {
321  button.addEventListener('click', function(event) {
322      event.preventDefault();
323      document.querySelectorAll('.p-group-button.is-on').forEach(activeButton => {
324          activeButton.classList.remove('is-on');
325      });
326      this.classList.add('is-on');
327  });
328});
329
330
331function checkWidth() {
332  var input = document.querySelector('input[type="text"].search-keyword');
333  if (window.innerWidth <= 1210) {
334    input.placeholder = '';
335  } else {
336    input.placeholder = 'キーワード検索';
337  }
338}
339checkWidth();
340window.addEventListener('resize', checkWidth);
341
342
343document.addEventListener("DOMContentLoaded", function() {
344  const video = document.getElementsByClassName('c-movie');
345  const observer = new IntersectionObserver((entries) => {
346    entries.forEach(entry => {
347      if (entry.isIntersecting) {
348        video.play();
349        observer.unobserve(video);
350      }
351    });
352  }, {
353    threshold: 0.5
354  });
355  observer.observe(video);
356});
357
358
359var parallaxTargets = null;
360window.addEventListener("load",()=>{
361	parallaxTargets = document.querySelectorAll("img[data-parallax]");
362	if(parallaxTargets){
363		parallaxTargets.forEach(p=>{p.style.objectFit="cover";});
364		window.addEventListener("resize",parallaxHandler,{passive:true});
365		window.addEventListener("scroll",parallaxHandler,{passive:true});
366		parallaxHandler();
367	}
368});
369function parallaxHandler(){
370	parallaxTargets.forEach(p=>{
371		let r = p.getBoundingClientRect();
372		p.style.objectPosition = "center "+((r.top+r.height) / (window.innerHeight+r.height) * 100)+"%";
373	});
374}
375
376
377document.addEventListener("DOMContentLoaded", function() {
378  const buttons = document.querySelectorAll('.c-jounal-category-btn');
379  const lists = document.querySelectorAll('.c-jounal-list');
380
381  buttons.forEach(button => {
382    button.addEventListener('click', function() {
383      const targetId = this.getAttribute('data-target');
384      const targetList = document.getElementById(targetId);
385
386      buttons.forEach(btn => btn.classList.remove('is-on'));
387      lists.forEach(list => list.classList.remove('is-active'));
388
389      this.classList.add('is-on');
390      targetList.classList.add('is-active');
391    });
392  });
393
394  document.querySelector('.c-jounal-category-btn.is-on').click();
395});
396
397
398$(function() {
399  $('.c-review-inner').matchHeight();
400});
401
402document.addEventListener('DOMContentLoaded', function () {
403  var splide01 = new Splide('.p-main-slider', {
404    type: 'fade',// loop
405    arrows: false,
406    perPage: 1,
407    perMove: 1,
408    focus: 'center',
409    gap: '30px',
410    // padding: {
411    //   left: '10%',
412    //   right: '10%',
413    // },
414    autoplay: true,
415    speed: 1500,
416    interval: 4000,
417    pauseOnHover: false,
418    pauseOnFocus: false,
419    resetProgress: false,
420    autoRestart: true,
421    rewind: true,
422    breakpoints: {
423      767: {
424        perPage: 1,
425        gap: 0,
426        padding: {
427          left: 0,
428          right: 0,
429        },
430      },
431    },
432  });
433
434  splide01.mount();
435});
436
437
438
439document.addEventListener('DOMContentLoaded', function () {
440  var splide02 = new Splide('#p-banner-wrapper', {
441    type: 'loop',
442    arrows: false,
443    perPage: 3,
444    focus: 'center',
445    gap: '10px',
446    padding: {
447      left: '5%',
448      right: '5%',
449    },
450    autoplay: true,
451    speed: 1500,
452    interval: 4000,
453    breakpoints: {
454      767: {
455        perPage: 1.5,
456        padding: {
457          left: 0,
458          right: 0,
459        },
460      },
461    },
462  });
463
464  splide02.mount();
465});
466
467
468document.addEventListener('DOMContentLoaded', function () {
469  var splide03 = new Splide('#p-ranking-splide', {
470    type: 'loop',
471    arrows: false,
472    perPage: 3,
473    focus: 'center',
474    gap: '30px',
475    padding: {
476      left: '15%',
477      right: '15%',
478    },
479    pagination: false,
480    breakpoints: {
481      767: {
482        perPage: 1.5,
483        gap: '10px',
484        padding: {
485          left: 0,
486          right: 0,
487        },
488      },
489    },
490  });
491
492  splide03.mount();
493});
494
495// document.addEventListener('DOMContentLoaded', function() {
496//   new Splide('.c-review-slider', {
497//     type      : 'loop',
498//     perPage   : 2,
499//     perMove   : 1,
500//     arrows    : false,
501//     pagination: true,
502//     gap       : '40px',
503//     breakpoints: {
504//       767: {
505//         perPage: 1,
506//       },
507//     },
508//   }).mount();
509// });
510
511document.addEventListener('DOMContentLoaded', function() {
512  new Splide('.c-item-staff-review-slider', {
513    type      : 'loop',
514    perPage   : 1,
515    perMove   : 1,
516    arrows    : false,
517    pagination: true,
518  }).mount();
519});
520
521const splide04 = new Splide(".p-favorite .splide", {
522  type: "loop",
523  pauseOnHover: false,
524  pauseOnFocus: false,
525  destroy: true,
526  arrows: false,
527  pagination: false,
528  breakpoints: {
529    500: {
530      destroy: false,
531      perPage: 2,
532    },
533  },
534}).mount();
535
536
537const splide05 = new Splide(".p-checked .splide", {
538  type: "loop",
539  pauseOnHover: false,
540  pauseOnFocus: false,
541  destroy: true,
542  arrows: false,
543  pagination: false,
544  breakpoints: {
545    500: {
546      destroy: false,
547      perPage: 2,
548    },
549  },
550}).mount();
551
552// LP
553
554
555
556
557$(function() {
558  $('.c-item-recommend-scene-lead').matchHeight();
559});
560
561
562
563//ここまで
564
565
566
567// favorite
568function MakeShop_afterFavoriteEntry(data) {
569    
570    $('a[href="' + data.source + '"]').addClass('favorite-active');
571    
572    if (!data.result) {
573        data.method.modal(data.error.message);
574    }
575
576    return false;
577}
578function MakeShop_afterListFavoriteRemove(data) {
579    if (!data.result) {
580        data.method.modal(data.error.message);
581        return false;
582    }
583    $('a[href="' + data.source + '"]').addClass('favorite-active').siblings('.favorite-active').removeClass('favorite-active');
584    return false;
585}
586function MakeShop_afterListFavoriteEntry(data) {
587    
588    $('a[href="' + data.source + '"]').addClass('favorite-active');
589    
590    if (!data.result) {
591        data.method.modal(data.error.message);
592    }
593
594    return false;
595}
596function MakeShop_afterListFavoriteRemove(data) {
597    
598    $('a[href="' + data.source + '"]').removeClass('favorite-active');
599
600    if (data.result) {
601        // お気に入りから削除が成功した場合
602        data.method.modal('お気に入りから削除しました');
603    } else {
604        // お気に入りから削除が失敗した場合
605        data.method.modal(data.error.message);
606    }
607
608    return false;
609}
610$('.js-slider-1').slick();
611$('.js-slider-2').slick();
612$('.js-slider-3').slick();
613$('.js-slider-4').slick();
614
615
616// Y-STYLEについて
617const images = document.querySelectorAll('.c-about-switch img');
618let number = 0;
619function changeImage() {
620  images[number].classList.remove('active');
621  number = (number + 1) % images.length;
622  images[number].classList.add('active');
623}
624setInterval(changeImage, 4000);
625
626
627// $(function(){
628// 	var i = 0;
629// 	$('.c-review-text').each(function() {
630// 		sHeight = $('.c-review-text').get(i).scrollHeight;
631// 		oHeight = $('.c-review-text').get(i).offsetHeight;
632// 		hiddenDiff = sHeight - oHeight;
633// 		if(hiddenDiff > 0){
634// 		$(this).parent().append('<div class="c-review-more">もっと見る</div>')
635// 		}
636// 		i++;
637// 	});
638// 	$(".c-review-more").click(function() {
639// 		txt_height = parseInt($(this).parent().find(".c-review-text").css('height'),10);
640// 		sHeight = $(this).parent().find(".c-review-text").get(0).scrollHeight;
641// 		oHeight = $(this).parent().find(".c-review-text").get(0).offsetHeight;
642// 		hiddenDiff = sHeight - oHeight;
643// 		new_txt_height = txt_height + hiddenDiff;
644// 		$(this).parent().find(".c-review-text").animate({ height: new_txt_height}, 700 );
645// 		$(this).slideUp();
646// 	});
647// });
648document.addEventListener('DOMContentLoaded', function() {
649  new Splide('.c-review-slider', {
650    type      : 'loop',
651    perPage   : 2,
652    perMove   : 1,
653    arrows    : false,
654    pagination: true,
655    gap       : '40px',
656    breakpoints: {
657      767: {
658        perPage: 1,
659      },
660    },
661  }).mount();
662});
663$(function () {
664	$('.c-review-text').each(function () {
665		const $this = $(this);
666		const originalHeight = $this.outerHeight();
667		const fullHeight = this.scrollHeight;
668		const hiddenDiff = fullHeight - originalHeight;
669
670		if (hiddenDiff > 0) {
671			$this.after('<div class="c-review-more">もっと見る</div>');
672		}
673
674		$this.next('.c-review-more').on('click', function () {
675			if ($this.hasClass('expanded')) {
676				$this.removeClass('expanded').animate({ height: originalHeight }, 700);
677				$(this).text('もっと見る');
678			} else {
679				$this.addClass('expanded').animate({ height: fullHeight }, 700);
680				$(this).text('隠す');
681			}
682		});
683	});
684});
685// document.addEventListener("DOMContentLoaded", function () {
686// 	const reviewTexts = document.querySelectorAll('.c-review-text');
687// 	reviewTexts.forEach(function (reviewText) {
688// 		const originalHeight = reviewText.offsetHeight;
689// 		const fullHeight = reviewText.scrollHeight;
690
691// 		const minHeight = window.matchMedia("(max-width: 767px)").matches ? 156 : 166;
692
693// 		if (originalHeight >= minHeight && fullHeight >= originalHeight) {
694// 			const moreButton = document.createElement('div');
695// 			moreButton.classList.add('c-review-more');
696// 			moreButton.textContent = 'もっと見る';
697// 			reviewText.insertAdjacentElement('afterend', moreButton);
698
699// 			moreButton.addEventListener('click', function () {
700// 				if (reviewText.classList.contains('expanded')) {
701// 					reviewText.classList.remove('expanded');
702// 					reviewText.style.height = `${originalHeight}px`;
703// 					moreButton.textContent = 'もっと見る';
704// 				} else {
705// 					reviewText.classList.add('expanded');
706// 					reviewText.style.height = `${fullHeight}px`;
707// 					moreButton.textContent = '隠す';
708// 				}
709// 			});
710// 		}
711// 	});
712// });
713
714
715
716document.addEventListener('DOMContentLoaded', function () {
717  const sliders = ['#right-content-slider_1-1', '#right-content-slider_1-2', '#right-content-slider_1-3', '#right-content-slider_1-4', '#right-content-slider_1-5', '#right-content-slider_1-6', '#right-content-slider_2-1', '#right-content-slider_2-2', '#right-content-slider_2-3', '#right-content-slider_2-4', '#right-content-slider_2-5', '#right-content-slider_2-6'];
718
719  sliders.forEach(selector => {
720    new Splide(selector, {
721      type: 'slide',
722      perPage: 1,
723      arrows: false,
724      pagination: true,
725      autoplay: false
726    }).mount();
727  });
728});

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.