PageSourceSearch

https://www.at-contact.jp/client_info/ATCONTACT/view/userweb/js/jquery.jj.bundle.js?timestamp=1791163393159

js at-contact.jp collected 2026-10-05 03:38:56 UTC 4,212 bytes, 104 lines download raw bytes

1// PC・SP判定用変数
2var jj_bundle_mode = null;
3
4// リスト判定用フラグ
5var jj_bundle_item_flg_01 = false;
6
7// 対象商品定義
8var jj_bundle_item_list_01 = [];
9jj_bundle_item_list_01.push('TEST_KK_0001');
10jj_bundle_item_list_01.push('S_KK_1031');
11
12// 対象となるバリエーションのID名を定義
13var id_base = 'ITEMPROPERTY_CD_';
14
15$(function ()
16{
17  /* 指定商品の2セット購入切り替え初期設定 START ********************************************************************** */
18  // 表示モード(pc or sp)の取得
19  var jj_bundle_mode = $('#jj_bundle_mode').val();
20  // 現在ページの商品コード
21  var page_item_code = $('#page_item_code').text();
22  // 商品コードの取得判定
23  if (page_item_code)
24  {
25    // 対象商品判定
26    if ($.inArray(page_item_code, jj_bundle_item_list_01) !== -1)
27    {
28      jj_bundle_item_flg_01 = true;
29    }
30
31    // パターンに該当する場合のみ
32    if (jj_bundle_item_flg_01)
33    {
34      // PC ==================================================
35      if (jj_bundle_mode === 'pc')
36      {
37        //セット2の選択項目を非表示
38        $('ul.cf li').each(function() {
39          $(this).children('.box-lens-select').slice(2).hide();
40        });
41      }
42      // ================================================== PC
43      // SP ==================================================
44      if (jj_bundle_mode === 'sp')
45      {
46        // 「左BC」というテキストを持ったdt要素の数を数える
47        var SetCount = $("dt:contains('å·¦BC')").length;
48        
49        // 2つ以上ある場合、2つ目以降を非表示にする
50        if (SetCount >= 2) {
51          $("dl:has(dt:contains('å·¦BC')):gt(0)").hide();
52          $("dl:has(dt:contains('右BC')):gt(0)").hide();
53          $("dl:has(dt:contains('左度数')):gt(0)").hide();
54          $("dl:has(dt:contains('右度数')):gt(0)").hide();
55        }
56      }
57      // ================================================== SP
58
59      // 共通 ==================================================
60
61        //選択肢の「セット1」「セット2」表記を非表示
62        $('[id*=ITEMPROPERTY_CD] option').text(function(index, text) {
63            return text.replace('セット1', '').replace('セット2', '');
64        });
65
66        //セット1のバリエーションをセット2に反映(左BC)
67        $('#ITEMPROPERTY_CD_0').change(function() {
68            var selectedText = $(this).find('option:selected').text().split("】")[1];
69            $('#ITEMPROPERTY_CD_4').find('option').each(function() {
70                if ($(this).text().split("】")[1] === selectedText) {
71                    $(this).prop('selected', true);
72                }
73            });
74        });
75        //セット1のバリエーションをセット2に反映(左度数)
76        $('#ITEMPROPERTY_CD_2').change(function() {
77            var selectedText = $(this).find('option:selected').text().split("】")[1];
78            $('#ITEMPROPERTY_CD_6').find('option').each(function() {
79                if ($(this).text().split("】")[1] === selectedText) {
80                    $(this).prop('selected', true);
81                }
82            });
83        });
84        //セット1のバリエーションをセット2に反映(右BC)
85        $('#ITEMPROPERTY_CD_1').change(function() {
86            var selectedText = $(this).find('option:selected').text().split("】")[1];
87            $('#ITEMPROPERTY_CD_5').find('option').each(function() {
88                if ($(this).text().split("】")[1] === selectedText) {
89                    $(this).prop('selected', true);
90                }
91            });
92        });
93        //セット1のバリエーションをセット2に反映(右度数)
94        $('#ITEMPROPERTY_CD_3').change(function() {
95            var selectedText = $(this).find('option:selected').text().split("】")[1];
96            $('#ITEMPROPERTY_CD_7').find('option').each(function() {
97                if ($(this).text().split("】")[1] === selectedText) {
98                    $(this).prop('selected', true);
99                }
100            });
101        });
102      // ================================================== 共通
103    }
104  }});

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.