PageSourceSearch

https://pro-kaguya.com/assets/js/menu+.js

js pro-kaguya.com collected 2026-10-06 13:16:37 UTC 3,333 bytes, 80 lines download raw bytes

1$(document).ready(function(){
2    $('.hamburger').click(function(){
3        var $this = $(this);
4        var $menuImg = $('.hamburger--container img');
5        if ($this.hasClass('is-active')){
6            // メニューを閉じる
7            $('.fsmenu, .logo').removeClass('is-active');
8            $('.fsmenu, .logo').addClass('close-menu');
9            // ハンバーガーアイコンを元に戻す
10            $menuImg.attr('src', './assets/images/bar_menu_off.webp');
11            // アニメーション完了後にメニューを完全に非表示にする
12            setTimeout(function(){
13                $('.fsmenu').css({
14                    'display': 'none',
15                    'pointer-events': 'none',
16                    'z-index': '-1'
17                });
18            }, 400); // CSSのtransition時間に合わせて調整
19        } else {
20            // メニューを開く
21            $('.fsmenu').css({
22                'display': 'block',
23                'pointer-events': 'auto',
24                'z-index': '20'
25            });
26            $('.fsmenu, .logo').removeClass('close-menu');
27            $('.fsmenu, .logo').addClass('is-active');
28            // ハンバーガーアイコンを変更
29            $menuImg.attr('src', './assets/images/bar_menu_on.webp');
30        }
31        $this.toggleClass('is-active');
32    });
33    
34    $(".fsmenu--list-element").hover(
35        function() {
36            $(this).addClass('open');
37            $(this).removeClass('is-closing');
38        }, 
39        function() {
40            $(this).removeClass('open');
41            $(this).addClass('is-closing'); // タイポ修正: is-citing -> is-closing
42        }
43    );
44    
45    // メニュー内のリンクをクリックした時にメニューを閉じる
46    $('.fsmenu--list-element a').click(function(e){
47        var href = $(this).attr('href');
48        
49        // アンカーリンクの処理(#で始まり、#だけではない場合)
50        if (href && href.startsWith('#') && href !== '#') {
51            e.preventDefault(); // デフォルトのスクロール動作を停止
52            var targetElement = $(href);
53            if (targetElement.length) {
54                var offset = 100; // オフセット値(px)
55                var targetPosition = targetElement.offset().top - offset;
56                // スムーススクロール
57                $('html, body').animate({
58                    scrollTop: targetPosition
59                }, 500);
60            }
61        }
62        
63        // メニューを閉じる処理(すべてのリンククリックで実行)
64        if ($('.hamburger').hasClass('is-active')) {
65            $('.hamburger').removeClass('is-active');
66            $('.fsmenu, .logo').removeClass('is-active');
67            $('.fsmenu, .logo').addClass('close-menu');
68            // ハンバーガーアイコンを元に戻す
69            $('.hamburger--container img').attr('src', './assets/images/bar_menu_off.webp');
70            // アニメーション完了後にメニューを完全に非表示にする
71            setTimeout(function(){
72                $('.fsmenu').css({
73                    'display': 'none',
74                    'pointer-events': 'none',
75                    'z-index': '-1'
76                });
77            }, 400);
78        }
79    });
80});

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.