PageSourceSearch

https://jyun-en.jp/wp/wp-content/themes/jyun-en/assets/js/app.js

js jyun-en.jp collected 2026-10-04 19:24:46 UTC 12,239 bytes, 475 lines download raw bytes

1setTimeout(() => {
2  // slide-menuの表示ボタン
3  $(function () {
4    $('.js-menu-btn').on('click', function () {
5      $('.p-slide-menu').addClass('js-menu-active');
6    })
7    $('.js-menu-close').on('click', function () {
8      $('.p-slide-menu').removeClass('js-menu-active');
9    })
10
11    $('.js-search-detail').on('click', function () {
12      $('.js-search-detail-check').toggleClass('js-search-detail-active');
13    })
14
15    //enkiri
16    $('.js-menu-btn').on('click', function () {
17      $('.p-enkiri-slide-menu').addClass('js-menu-active');
18    })
19    $('.js-menu-close').on('click', function () {
20      $('.p-enkiri-slide-menu').removeClass('js-menu-active');
21    })
22    //shop
23    $('.btn-mob-menu').on('click', function () {
24      $(this).toggleClass('is-active');
25      $('.mob-menu-panel').fadeToggle();
26    })
27  });
28  //shopページ ページトップへ戻るボタン
29  $(function () {
30    var appear = false;
31    var pagetop = $('#page_top');
32    $(window).scroll(function () {
33      if ($(this).scrollTop() > 100) {  //100pxスクロールしたら
34        if (appear == false) {
35          appear = true;
36          pagetop.stop().animate({
37            'bottom': '10px' //下から50pxの位置に
38          }, 300); //0.3秒かけて現れる
39        }
40      } else {
41        if (appear) {
42          appear = false;
43          pagetop.stop().animate({
44            'bottom': '-110px' //下から-50pxの位置に
45          }, 300); //0.3秒かけて隠れる
46        }
47      }
48    });
49    pagetop.click(function () {
50      $('body, html').animate({ scrollTop: 0 }, 500); //0.5秒かけてトップへ戻る
51      return false;
52    });
53  });
54  // ------------------------------------------------
55  //shopページ 商品カテゴリーメニュー 
56  $(function () {
57    // hover時
58    $('.item-nav-pc ul li.has-child').hover(
59      function () {
60        var result = $(this).position();
61        $(this).find('ul li:first-child').css("margin-top", result.top + "px");
62      },
63      function () {
64        $(this).find('ul li:first-child').css("margin-top", "0px");
65      }
66    );
67    // click時
68    $('.item-nav-sp li.has-child span.btn-child-link').on('click', function () {
69      var index = $('.item-nav-sp li.has-child span.btn-child-link').index($(this));
70      var hasClass = 'has-open';
71      var toggleClass = 'child-links';
72
73      $('.item-nav-sp li.has-child span.btn-child-link').each(function (i, elem) {
74        if (index != i) {
75          // クリック箇所の設定
76          $(elem).removeClass(hasClass);
77          $(elem).next().removeClass(toggleClass);
78          $(elem).text('+');
79        }
80      });
81
82      // クリック箇所の設定
83      $(this).next().toggleClass(toggleClass);
84      $(this).toggleClass(hasClass);
85      var icon = $(this).hasClass(hasClass) ? '-' : '+';
86      $(this).text(icon);
87    });
88  });
89  // ------------------------------------------------
90  //shopページ 商品検索
91  $('.button.woof_reset_search_form').text('リセット');
92  $('.button.woof_submit_search_form').text('検索');
93
94  // ------------------------------------------------
95  //shopページ 商品詳細 レビュー機能
96  // $('input[name="cr_input_text_search"]').attr('placeholder', 'レビューを検索');
97  // // ソート順のテキスト変更
98  // var selData = { recent: '新着順', ratinghigh: '評価が高い順', ratinglow: '評価が低い順' };
99  // $.each($('select.cr-ajax-reviews-sort option'), function(i, val){
100  //     $(val).text(selData[$(val).val()]);
101  // });
102  // 「さらにレビューを表示する」ボタン
103  // $('.cr-show-more-reviews-prd').text('さらにレビューを表示する');
104  // $(".cr-ajax-reviews-sort").change(function(){
105  //   console.log("表示");
106  //   $('.cr-show-more-reviews-prd').ready(function () {
107  //     console.log("chg");
108  //       $(this).text('さらにレビューを表示する');
109  //   });
110  // });
111  // ------------------------------------------------
112  var photoSlider = new Swiper('.photoSlider', {
113    slidesPerView: 1,
114    initialSlide: 0,
115    centerInsufficientSlides: true,
116    autoplay: {
117      delay: 3000,
118      stopOnLastSlide: false,
119      disableOnInteraction: false,
120      reverseDirection: false,
121    },
122    pagination: {
123      el: '.swiper-pagination',
124      type: 'bullets',
125      clickable: true
126    },
127    breakpoints: {
128      767: {
129        slidesPerView: 3,
130        spaceBetween: 0
131      }
132    }
133  });
134
135  // top-spot-slider
136  var spotSlider = new Swiper('.spotSlider', {
137    loop: true,
138    slidesPerView: 1,
139    spaceBetween: 20,
140    navigation: {
141      nextEl: '.swiper-button-next', //「次へボタン」要素の指定
142      prevEl: '.swiper-button-prev', //「前へボタン」要素の指定
143    },
144    pagination: {
145      el: ".swiper-pagination",
146      clickable: true,
147    },
148    speed: 2000,
149    autoplay: {
150      delay: 2000,
151      disableOnInteraction: false,
152    },
153    breakpoints: {
154      768: {
155        slidesPerView: 2,
156        spaceBetween: 20,
157      },
158      1024: {
159        slidesPerView: 3,
160        spaceBetween: 20,
161      }
162    }
163  });
164  // ------------------------------------------------
165  // コラムで紹介された商品
166  var shopColumnItemSlide = new Swiper(".shopColumnItemSlide", {
167    loop: true,
168    slidesPerView: 2,
169    spaceBetween: 20,
170    breakpoints: {
171      1000: {
172        slidesPerView: 3,
173        spaceBetween: 35,
174        centeredSlides: true
175      }
176    },
177    navigation: {
178      nextEl: ".c-card07__next",
179      prevEl: ".c-card07__prev"
180    },
181    pagination: {
182      el: '.swiper-pagination-column',
183      type: 'bullets',
184      clickable: true
185    },
186    speed: 1000,
187    autoplay: {
188      delay: 2000,
189      disableOnInteraction: false,
190    },
191  });
192
193
194
195  var goshintaiSlider = new Swiper('.goshintaiSlider', {
196    loop: true,
197    slidesPerView: 1,
198    navigation: {
199      nextEl: '.swiper-button-next', //「次へボタン」要素の指定
200      prevEl: '.swiper-button-prev', //「前へボタン」要素の指定
201    },
202    breakpoints: {
203      767: {
204        slidesPerView: 2,
205        spaceBetween: 0
206      }
207    }
208  });
209
210  //enkiri-slider
211  var enkiriRecommendedSlider = new Swiper('.enkiriRecommendedSlider', {
212    slidesPerView: 1,
213    loop: true,
214    initialSlide: 4,
215    spaceBetween: 20,
216    navigation: {
217      nextEl: '.swiper-button-next', //「次へボタン」要素の指定
218      prevEl: '.swiper-button-prev', //「前へボタン」要素の指定
219    },
220    pagination: {
221      el: '.swiper-pagination',
222      type: 'bullets',
223      clickable: true
224    },
225    breakpoints: {
226      767: {
227        slidesPerView: 2,
228        spaceBetween: 38,
229      },
230      1080: {
231        slidesPerView: 3,
232        spaceBetween: 38,
233      }
234    }
235  });
236
237  var enkiriReportSlider = new Swiper('.enkiriReportSlider', {
238    slidesPerView: 1,
239    loop: true,
240    initialSlide: 4,
241    spaceBetween: 20,
242    scrollbar: {  //スクロールバーを表示
243      el: '.swiper-scrollbar',
244      draggable: true,
245    },
246    navigation: {
247      nextEl: '.swiper-button-next', //「次へボタン」要素の指定
248      prevEl: '.swiper-button-prev', //「前へボタン」要素の指定
249    },
250    pagination: {
251      el: '.swiper-pagination',
252      type: 'bullets',
253      clickable: true
254    },
255    breakpoints: {
256      767: {
257        slidesPerView: 2,
258        spaceBetween: 38,
259      },
260      1080: {
261        slidesPerView: 3,
262        spaceBetween: 38,
263      }
264    }
265  });
266
267  var enkiriPhotoSlider = new Swiper('.enkiriPhotoSlider', {
268    slidesPerView: 1,
269    loop: true,
270    navigation: {
271      nextEl: '.swiper-button-next', //「次へボタン」要素の指定
272      prevEl: '.swiper-button-prev', //「前へボタン」要素の指定
273    },
274  });
275
276  var enkiriMovieSlider = new Swiper('.enkiriMovieSlider', {
277    slidesPerView: 1,
278    loop: true,
279    navigation: {
280      nextEl: '.swiper-button-next', //「次へボタン」要素の指定
281      prevEl: '.swiper-button-prev', //「前へボタン」要素の指定
282    },
283  });
284
285  var enkiriPickupSlider = new Swiper('.enkiriPickupSlider', {
286    slidesPerView: 1,
287    loop: true,
288    initialSlide: 4,
289    spaceBetween: 20,
290    navigation: {
291      nextEl: '.swiper-button-next', //「次へボタン」要素の指定
292      prevEl: '.swiper-button-prev', //「前へボタン」要素の指定
293    },
294    pagination: {
295      el: '.swiper-pagination',
296      type: 'bullets',
297      clickable: true
298    },
299    breakpoints: {
300      767: {
301        slidesPerView: 2,
302      },
303      1080: {
304        slidesPerView: 3,
305      },
306    }
307  });
308
309  var shopMainSlide = new Swiper('.shopMainSlide', {
310    centeredSlides: true,
311    slidesPerView: 1.2,
312    loop: true,
313    initialSlide: 1,
314    spaceBetween: 10,
315    autoplay: {
316      delay: 3000,
317      stopOnLastSlide: false,
318      disableOnInteraction: false,
319      reverseDirection: false
320    },
321    // pagination: {
322    //   el: '.swiper-pagination',
323    //   type: 'bullets',
324    //   clickable: true
325    // },
326    breakpoints: {
327      768: {
328        slidesPerView: 1.5
329      }
330    }
331  });
332  /*
333    var shopPickUpItemSlide = new Swiper('.shopPickUpItemSlide', {
334      centeredSlides: true,
335      slidesPerView: 1.5,
336      loop: true,
337      initialSlide: 1,
338      spaceBetween: 20,
339      autoplay: {
340        delay: 3000,
341        stopOnLastSlide: false,
342        disableOnInteraction: false,
343        reverseDirection: false
344      },
345      pagination: {
346        el: '.swiper-pagination',
347        type: 'bullets',
348        clickable: true
349      },
350      breakpoints: {
351        768: {
352          slidesPerView: 3.9
353        },
354        992: {
355          slidesPerView: 3.9,
356          spaceBetween: 30
357        }
358      }
359    });
360  */
361  var shopNewItemSlide = new Swiper('.shopNewItemSlide', {
362    centeredSlides: true,
363    slidesPerView: 1.5,
364    loop: true,
365    initialSlide: 1,
366    spaceBetween: 20,
367    autoplay: {
368      delay: 3000,
369      stopOnLastSlide: false,
370      disableOnInteraction: false,
371      reverseDirection: false
372    },
373    pagination: {
374      el: '.swiper-pagination',
375      type: 'bullets',
376      clickable: true
377    },
378    breakpoints: {
379      768: {
380        slidesPerView: 3.5
381      }
382    }
383  });
384
385  var shopMainSlide = new Swiper('.spotMainSlide', {
386    slidesPerView: 1,
387    loop: true,
388    initialSlide: 1,
389    spaceBetween: 0,
390    autoplay: {
391      delay: 3000,
392      stopOnLastSlide: false,
393      disableOnInteraction: false,
394      reverseDirection: false
395    },
396    pagination: {
397      el: '.swiper-pagination',
398      type: 'bullets',
399      clickable: true
400    }
401  });
402
403  // 人気の商品
404  let popBreakPoint = 767;
405  let popSwiper;
406  let popSwiperBool;
407  window.addEventListener("load", () => {
408    if (popBreakPoint < window.innerWidth) {
409      popSwiperBool = false;
410    } else {
411      createSwiper();
412      popSwiperBool = true;
413    }
414  }, false);
415  window.addEventListener("resize", () => {
416    if (popBreakPoint < window.innerWidth && popSwiperBool) {
417      popSwiper.destroy(false, true);
418      popSwiperBool = false;
419    } else if (popBreakPoint >= window.innerWidth && !popSwiperBool) {
420      createSwiper();
421      popSwiperBool = true;
422    }
423  }, false);
424
425  const createSwiper = () => {
426    popSwiper = new Swiper(".shopPopularityItemSlide", {
427      loop: true,
428      navigation: {
429        nextEl: ".swiper-button-next",
430        prevEl: ".swiper-button-prev"
431      },
432      pagination: {
433        el: '.swiper-pagination-popular',
434        type: 'bullets',
435        clickable: true
436      },
437      speed: 1000,
438      autoplay: {
439        delay: 1000,
440        disableOnInteraction: false,
441      },
442      slidesPerView: 2,
443      spaceBetween: 20,
444    });
445  };
446}, 100);
447
448var usefulFeatureSlide = new Swiper(".usefulFeatureSlide", {
449  loop: true,
450  slidesPerView: 2,
451  spaceBetween: 20,
452  breakpoints: {
453    1000: {
454      slidesPerView: 4,
455      spaceBetween: 20,
456      centeredSlides: false // trueをfalseに変更
457    }
458  },
459  navigation: {
460    nextEl: ".swiper-button-next",
461    prevEl: ".swiper-button-prev"
462  },
463  pagination: {
464    el: '.swiper-pagination-useful',
465    type: 'bullets',
466    clickable: true
467  },
468  speed: 1000,
469  autoplay: {
470    delay: 2000,
471    disableOnInteraction: false,
472  },
473});
474
475

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.