PageSourceSearch

https://www.miraischool.jp/wp-content/themes/original/assets/js/common.js

js miraischool.jp collected 2026-10-06 21:13:31 UTC 5,523 bytes, 187 lines download raw bytes

1//お問い合わせ
2
3$(function() {
4    $(".form_btn").prop("disabled", true);
5
6    $("#agree").on("click", function() {
7        if ($(this).prop("checked")) {
8            $(".form_btn").prop("disabled", false).addClass("-active");
9        } else {
10            $(".form_btn").prop("disabled", true).removeClass("-active");
11        }
12    });
13});
14
15
16//scrollreveal
17
18$(function() {
19    //初期値
20    ScrollReveal().reveal('.scroll', {
21        delay: 0,
22        duration: 1500,
23        origin: 'bottom',
24        distance: '15px',
25        opacity: 0,
26        viewFactor:0.2,
27    });
28
29    // 以下オプション
30    // delay:      実行されるまでの時間
31    // duration:   アニメーションの完了にかかる時間
32    // distance:   表示された時に要素が移動する距離
33    // interval:   インターバルの時間
34    // viewFactor: 0~1,要素がどれくらい見えたら実行するか
35    // scale:      表示前の要素のサイズ
36    // opacity:    表示前の透明度
37    // origin:     要素の表示される方向 top/right/bottom/left
38
39    for (let i = 0; i <= 3000; i += 50) {
40        ScrollReveal().reveal(`.-del${i}`, {
41            delay: i,
42        });
43    }
44
45    for (let i = 0; i <= 3000; i += 50) {
46        ScrollReveal().reveal(`.-dur${i}`, {
47            duration: i,
48        });
49    }
50
51    for (let i = 0; i <= 50; i += 10) {
52        ScrollReveal().reveal(`.-dis${i}`, {
53            distance: `${i}px`,
54        });
55    }
56
57    for (let i = 100; i <= 300; i += 100) {
58        ScrollReveal().reveal(`.-int${i}`, {
59            interval: i,
60        });
61    }
62
63    for (let i = 1; i <= 10; i++) {
64        ScrollReveal().reveal(`.-vie0${i}`, {
65            viewFactor: i / 10,
66        });
67    }
68
69    for (let i = 1; i <= 30; i++) {
70        ScrollReveal().reveal(`.-sca0${i}`, {
71            scale: i / 10,
72        });
73    }
74
75    for (let i = 1; i <= 10; i++) {
76        ScrollReveal().reveal(`.-opa0${i}`, {
77            opacity: i / 10,
78        });
79    }
80
81    const sr_origins = ['top', 'right', 'bottom', 'left'];
82    for (let i = 0; i < sr_origins.length; i++) {
83        const sr_origin = sr_origins[i];
84        ScrollReveal().reveal(`.-org_${sr_origin}`, {
85            origin: sr_origin,
86        });
87    }
88});
89
90
91$(function() {
92    $("#top .point .point_head").on("click", function() {
93        $(this).toggleClass("-active");
94        $(this).next("#top .point .point_txt").slideToggle();
95    });
96});
97
98
99$(document).ready(function() {
100    $(".hd .menu_btn").click(function (event) {
101        event.stopPropagation(); // イベントバブリングを停止
102        $(this).toggleClass('-active');
103        $(".hd .menu_content").toggleClass('-active');
104        $(".hd .hd_overlay").toggleClass('-active');
105        $("body").toggleClass('-noscroll');
106    });
107
108    $(".hd .menu_content a").click(function () {
109        $(".hd .menu_btn").removeClass('-active');
110        $(".hd .menu_content").removeClass('-active');
111        $(".hd .hd_overlay").removeClass('-active');
112        $("body").removeClass('-noscroll');
113    });
114
115    // メニュー以外の部分をクリックしたらメニューを閉じる
116    $(document).click(function (event) {
117        if (!$(event.target).closest('.hd_menu, .menu_btn').length) {
118            $(".hd .menu_btn").removeClass('-active');
119            $(".hd .menu_content").removeClass('-active');
120            $(".hd .hd_overlay").removeClass('-active');
121            $("body").removeClass('-noscroll');
122        }
123    });
124
125    // メニューのコンテンツ部分内でクリックイベントが発生した場合はイベントを停止
126    $(".hd .menu_content").click(function(event){
127        event.stopPropagation();
128    });
129});
130
131$(function() {
132    $("#angel-cosmo .faq_item .faq_head").on("click", function() {
133        $(this).toggleClass("-close");
134        $(this).next("#angel-cosmo .faq_answer").slideToggle();
135    });
136});
137
138$(function() {
139    $("#prince-princess .faq_item .faq_head").on("click", function() {
140        $(this).toggleClass("-close");
141        $(this).next("#prince-princess .faq_answer").slideToggle();
142    });
143});
144
145$(function() {
146    $("#petit-angel .faq_item .faq_head").on("click", function() {
147        $(this).toggleClass("-close");
148        $(this).next("#petit-angel .faq_answer").slideToggle();
149    });
150});
151
152function adjustMvLayout() {
153    const hdInner = document.querySelector('.hd_inner');
154    const mv = document.querySelector('.mv');
155    const mvTargets = document.querySelectorAll('.mv_inner, .mv_img, .mv_img img');
156
157    if (hdInner && mv) {
158      const hdHeight = hdInner.offsetHeight;
159
160      // .mvのpadding-top調整
161      mv.style.paddingTop = hdHeight + 'px';
162
163      // height: calc(100svh + ヘッダーの高さ) をJSで付ける
164      mvTargets.forEach(el => {
165        el.style.height = `calc(100svh - ${hdHeight}px)`;
166      });
167    }
168  }
169
170  window.addEventListener('load', adjustMvLayout);
171  window.addEventListener('resize', adjustMvLayout);
172
173
174  document.querySelectorAll('.event_secttl h2').forEach(el => {
175    const text = el.textContent;
176    el.setAttribute('data-text', text);
177  });
178
179
180
181//   $(function() {
182//     $(".age_btn").on("click", function(e) {
183//       e.preventDefault();
184//       $(this).toggleClass("-active");
185//       $(this).next(".age_course").stop(true).slideToggle(300);
186//     });
187//   });

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.