PageSourceSearch

https://hanadai-dontaku.com/js/menu.js

js hanadai-dontaku.com collected 2026-10-09 03:18:34 UTC 1,672 bytes, 79 lines download raw bytes

1var scrollY = 0;
2var scrollP = 80;
3var scrollL = 500;
4var space = 0;
5
6// JavaScript Document
7$('#menu').on('click', function(){
8$(this).toggleClass("active");
9$("#gNav").toggleClass("active");
10
11if( $('body').hasClass('scroll-prevent') ){
12$('body').removeClass('scroll-prevent');
13$(window).scrollTop(scrollY);
14} else {
15if( $(window).width() >= 768 ){
16space = 0.85;
17} else {
18space = 0.45;
19}
20scrollY = $(window).scrollTop();
21$('body').toggleClass('scroll-prevent');
22}
23
24});
25
26$('nav .close').on('click', function(){
27$('#menu').removeClass("active");
28$("#gNav").toggleClass("active");
29
30if( $('body').hasClass('scroll-prevent') ){
31$('body').removeClass('scroll-prevent');
32$(window).scrollTop(scrollY);
33}
34
35});
36
37
38$(window).on('scroll',function(){
39if( $(window).width() >= 768 ){
40//スクロール位置を取得
41if ( $(this).scrollTop() > scrollP ) {
42$("#menu").addClass("on");
43} else {
44$("#menu").removeClass("on");
45}
46//スクロール位置を取得
47if ( $(this).scrollTop() > scrollL ) {
48$("h1").addClass("on");
49} else {
50$("h1").removeClass("on");
51}
52} else {
53}
54});
55
56$(window).on('resize',function(){
57if( $(window).width() >= 768 ){
58//スクロール位置を取得
59if ( $(this).scrollTop() > scrollP ) {
60$("#menu").addClass("on");
61} else {
62$("#menu").removeClass("on");
63}
64//スクロール位置を取得
65if ( $(this).scrollTop() > scrollL) {
66$("h1").addClass("on");
67} else {
68$("h1").removeClass("on");
69}
70} else {
71}
72});
73
74$("#gNav .navMenu a").on('click', function(){
75$('body').removeClass('scroll-prevent');
76$("#menu").toggleClass("active");
77$("#gNav").toggleClass("active");
78$('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top - 80 }, 'slow','swing');
79});

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.