PageSourceSearch

https://www.tsuburaya-fields.co.jp/newscms/wp-content/themes/tsuburaya/assets/js/news.js

js tsuburaya-fields.co.jp collected 2026-10-02 18:28:51 UTC 1,145 bytes, 24 lines download raw bytes

1document.addEventListener("DOMContentLoaded", function () {
2  // ニュースメニューの処理
3  const menuItems = document.querySelectorAll(".news-menu li");
4  const newsContainers = document.querySelectorAll(".news-container");
5
6  menuItems.forEach(item => {
7      item.addEventListener("click", function (event) {
8          event.preventDefault(); // リンクのデフォルト動作を防止
9
10          // すべてのメニューアイテムの active クラスを削除
11          menuItems.forEach(menu => menu.classList.remove("active"));
12
13          // すべてのニュースコンテナの active クラスを削除
14          newsContainers.forEach(container => container.classList.remove("active"));
15
16          // クリックされたメニューに active クラスを追加
17          this.classList.add("active");
18
19          // 対応するニュースコンテナに active クラスを追加
20          const targetClass = this.classList[0]; // メニューの最初のクラス名を取得
21          document.querySelector(`.news-container.${targetClass}`).classList.add("active");
22      });
23  });
24});

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.