PageSourceSearch

https://www.partners-shop.com/view/asset/user-5-1-2-91731bfa859a46c83e6951820e9100a9.js

js partners-shop.com collected 2026-10-04 15:34:33 UTC 3,526 bytes, 106 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            document.addEventListener('DOMContentLoaded', () => {
70  const headers = document.querySelectorAll('.accordion-header');
71
72  headers.forEach(header => {
73    header.addEventListener('click', function() {
74      const currentItem = this.parentElement;
75      const currentContent = this.nextElementSibling;
76      const isActive = currentItem.classList.contains('is-active');
77
78      // 1. 他の開いているパネルをすべて閉じる
79      document.querySelectorAll('.accordion-item').forEach(item => {
80        if (item !== currentItem) {
81          item.classList.remove('is-active');
82          item.querySelector('.accordion-content').style.maxHeight = null;
83        }
84      });
85
86      // 2. クリックされたパネルの開閉を切り替える
87      if (isActive) {
88        currentItem.classList.remove('is-active');
89        currentContent.style.maxHeight = null;
90      } else {
91        currentItem.classList.add('is-active');
92        // scrollHeight を使うことで、中身の高さに合わせて綺麗にアニメーションします
93        currentContent.style.maxHeight = currentContent.scrollHeight + "px";
94
95        // 3. 少し遅らせてスムーズに画面上部へスクロール追従させる
96        setTimeout(() => {
97          currentItem.scrollIntoView({
98            behavior: 'smooth',
99            block: 'start' // 画面上部にピタッと合わせる
100          });
101        }, 300); // アニメーションの完了に合わせる(必要に応じて微調整)
102      }
103    });
104  });
105});
106           

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.