PageSourceSearch

https://www.cataloghouse.co.jp/common/202307/js/scroll.js?20250306

js cataloghouse.co.jp collected 2026-09-24 09:09:39 UTC 1,385 bytes, 43 lines download raw bytes

1window.ch_event_init = window.ch_event_init || [];
2ch_event_init.push(function () {
3  jQuery(function ($) {
4    /* ----------------------------------------
5    Smooth Scroll (トップに戻るボタン)
6  ---------------------------------------- */
7    $(function () {
8      var btn = $(".p-footer__scroll-button");
9      var timer;
10      var scrollThreshold = 500;
11
12      $(window).scroll(function () {
13        //スクロール開始するとボタンを非表示
14        btn.removeClass("is-active");
15        //スクロール中はイベントの発火をキャンセルする
16        clearTimeout(timer);
17
18        //スクロールが停止して0.3秒後にイベントを発火する
19        timer = setTimeout(function () {
20          // 現在のスクロール位置を取得
21          var scrollTop = $(window).scrollTop();
22
23           // ヘッダーの高さ分スクロールされた場合、ボタンを表示
24          if  (scrollTop > scrollThreshold) {
25            btn.addClass("is-active");
26          } else {
27            btn.removeClass("is-active");
28          }
29        }, 300);
30      });
31      //ボタンクリックでトップへ戻る
32      btn.click(function () {
33        $("body,html").animate(
34          {
35            scrollTop: 0,
36          },
37          300
38        );
39        return false;
40      });
41    });
42  });
43}); // End of ch_event_init.push()

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.