PageSourceSearch

https://www.nagai.co.jp/main/wp-content/themes/kleo-child/js/product.js

js nagai.co.jp collected 2026-10-04 02:16:29 UTC 1,776 bytes, 60 lines download raw bytes

1$(function () {
2    $('.accordion__button').on('click', function () {
3        $(this).toggleClass('active');
4        $(this).parent().next('.accordion__items').toggleClass('active');
5    });
6    $(window).on('load', function () {
7        if ($(window).width() > 768) {
8            $('.accordion__items').addClass('active');
9        }
10    });
11});
12
13$(function () {
14    // 置換の対象とするclass属性。
15    var $elem = $('.js-image-switch');
16    // 置換の対象とするsrc属性の末尾の文字列。
17    var sp = '_sp.';
18    var pc = '_pc.';
19    // 画像を切り替えるウィンドウサイズ。
20    var replaceWidth = 768;
21
22    function imageSwitch() {
23        // ウィンドウサイズを取得する。
24        var windowWidth = parseInt(window.innerWidth);
25
26        // ページ内にあるすべての`.js-image-switch`に適応される。
27        $elem.each(function () {
28            var $this = $(this);
29            // ウィンドウサイズが768px以上であれば_spを_pcに置換する。
30            if (windowWidth >= replaceWidth) {
31                $this.attr('src', $this.attr('src').replace(sp, pc));
32
33                // ウィンドウサイズが768px未満であれば_pcを_spに置換する。
34            } else {
35                $this.attr('src', $this.attr('src').replace(pc, sp));
36            }
37        });
38    }
39    imageSwitch();
40});
41
42$(function () {
43    $('.product__gallery').slick({
44        slidesToShow: 4,
45        slidesToScroll: 4,
46        infinite: false,
47        arrow: true,
48
49        responsive: [{
50
51            breakpoint: 768,
52            settings: {
53                slidesToShow: 1,
54                slidesToScroll: 1,
55                rows: 2,
56                slidesPerRow: 2,
57            }
58        }]
59    });
60});

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.