PageSourceSearch

https://ccreb.jp/mng/wp-content/themes/ccreb/assets/js/add_script.js?v20261004143420

js ccreb.jp collected 2026-10-04 14:34:32 UTC 3,256 bytes, 120 lines download raw bytes

1$(function () {
2
3  $(document).ready(function () {
4    /*
5      テーブルのスクロールガイド
6     */
7    if ($('.scroll-guide').length > 0){
8      setTimeout(function () {
9        $('.scroll-guide').fadeOut(190);
10      }, 5000);
11      
12      // クリックまたはタッチでフェードアウト
13      $('.scroll-guide').on('click touchstart', function () {
14        $(this).fadeOut(190);
15      });
16    } 
17
18    /*
19    現在のページIDを取得(例: "page_event" → "event")
20    */
21    const pageId = $('.contents').attr('id')?.replace('page_', '');
22    const asideMenu = $('.aside-menu');
23
24    // この処理を関数化して再利用できるようにする
25    function activateCurrentMenuItem() {
26      if (asideMenu.length > 0) {
27        const targetMenuId = 'aside-menu_' + pageId;
28
29        $('.current-check').each(function () {
30          if ($(this).attr('id') === targetMenuId) {
31            $(this).addClass('active');
32
33            if($(this).parent().hasClass('submenu')){
34              $(this).parent().prev().toggleClass('active');
35              $(this).parent().show();
36            }
37          }
38        });
39      }
40    }
41
42    // 初期表示時にも実行
43    activateCurrentMenuItem();
44
45    /*
46    サイドメニュー 下層メニュートグル
47    */
48    $('.submenu_button').on('click', function () {
49      if (!$(this).hasClass('active')) {
50        $(this).next('.submenu').slideDown(190);
51        $(this).toggleClass('active');
52      } else {
53        $(this).next('.submenu').slideUp(190);
54        $(this).toggleClass('active');
55      }
56    });
57
58    $('.submenu_button2').on('click', function () {
59      if (!$(this).hasClass('active')) {
60        $(this).next('.submenu').slideDown(190);
61        $(this).toggleClass('active');
62      } else {
63        $(this).next('.submenu').slideUp(190);
64        $(this).toggleClass('active');
65      }
66      
67    });
68
69    /*
70    トグル
71    */
72    $('.ir_toggle_btn').on('click', function (e) {
73      e.preventDefault();
74
75      const $toggle = $(this).closest('.ir_toggle');
76
77      $toggle.toggleClass('active');
78
79      $toggle.find('.ir_toggle_body').stop().slideToggle(190);
80    });
81
82      
83  });//ready
84
85  //株価情報
86  if($(`[data-finance]`).length > 0){
87    $.ajax({
88      url:'/api/get_finance.php',
89      type:'GET',
90      dataType: 'json',
91      cache : false
92    })
93    .done( (data) => {
94      $(`[data-finance-date]`).html(data.date);
95      $(`[data-finance-price]`).html(data.price);
96      $(`[data-finance-change]`).html(data.change);
97      $(`[data-finance-percent]`).html(data.percent);
98      $(`[data-finance-volume]`).html(data.volume);
99    })
100    .fail( (jqXHR, textStatus, errorThrown) => {
101    });
102  }
103
104  let animated = false;
105  const pieChart = document.querySelector('#graph_box2 .pie_chart');
106  
107  if( pieChart) {
108
109    window.addEventListener('scroll', function () {
110      const rect = pieChart.getBoundingClientRect();
111      const inView = rect.top < window.innerHeight && rect.bottom > 0;
112
113      if (inView && !animated) {
114        pieChart.classList.add('animate');
115        animated = true;
116      }
117    });
118        
119  }
120});

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.