PageSourceSearch

https://honma-office.jp/wp-content/package/js/nc-tab.js

js honma-office.jp collected 2026-10-06 08:08:27 UTC 1,069 bytes, 25 lines download raw bytes

1export function initTabMenu() {
2    console.log("タブ初期化開始"); // これがコンソールに出るか確認
3    const containers = document.querySelectorAll('.ncTab');
4
5    containers.forEach((container, cIndex) => {
6        const buttons = container.querySelectorAll('.ncTab_button > *');
7        console.log(`コンテナ${cIndex}: ボタン数 ${buttons.length}`);
8
9        buttons.forEach((btn, index) => {
10            btn.addEventListener('click', () => {
11                console.log(`${index}番目のボタンが押されました`); // 出ないならここが原因
12                
13                // クラスの付け替え
14                buttons.forEach(b => b.classList.remove('active'));
15                btn.classList.add('active');
16
17                const contents = container.querySelectorAll('.ncTab_content > *');
18                contents.forEach(c => c.classList.remove('active'));
19                if (contents[index]) {
20                    contents[index].classList.add('active');
21                }
22            });
23        });
24    });
25}

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.