PageSourceSearch

https://syoei-k.com/wp-content/themes/syoei/scripts/anime.js?ver=1.0

js syoei-k.com collected 2026-10-05 07:31:41 UTC 9,782 bytes, 323 lines download raw bytes

1jQuery(function (jQuery) {
2
3    $(window).on('load', function () {
4      $('body').removeClass('fadeout');
5    });
6  
7    $('a:not([href^="#"]):not([target])').on('click', function (e) {
8      e.preventDefault(); // ナビゲートをキャンセル
9      url = $(this).attr('href'); // 遷移先のURLを取得
10      if (url !== '') {
11        $('body').addClass('fadeout');  // bodyに class="fadeout"を挿入
12        setTimeout(function () {
13          window.location = url;  // 0.8秒後に取得したURLに遷移
14        }, 700);
15      }
16      return true;
17    });
18
19    // pagetop
20    $(window).on('load scroll', function () {
21      if ($(window).scrollTop() > 200) {
22        $('#pagetop').addClass("active")
23        $('#pagetop').fadeIn()
24      } else {
25        $('#pagetop').removeClass("active")
26        $('#pagetop').fadeOut()
27      }
28    });
29  
30    // title anime
31  const CLASSNAME = "-visible";
32  const TIMEOUT = 900;
33  const DELAY = 0;
34  const $target1 = $(".site_title");
35  
36  setInterval(() => {
37    $target1.addClass(CLASSNAME);}, TIMEOUT * 2);
38  
39    //page scroll
40    $(function () {
41      $('a[href^="#"]').click(function () {
42        var speed = 400;
43        var href = $(this).attr("href");
44        var target = $(href == "#" || href == "" ? 'html' : href);
45        var position = target.offset().top;
46        $("html, body").animate({ scrollTop: position }, speed, "swing");
47        return false;
48      });
49    });
50  
51    $(document).ready(function () {
52      $(window).on("scroll", function () {
53        scrollHeight = $(document).height();
54        scrollPosition = $(window).height() + $(window).scrollTop();
55        footHeight = $(".copyright").innerHeight();
56        if (scrollHeight - scrollPosition <= footHeight) {
57          $("#pagetop").css({
58            position: "absolute",
59            bottom: footHeight + 20,
60          });
61        } else {
62          $("#pagetop").css({
63            position: "fixed",
64            bottom: "15px",
65          });
66        }
67      });
68    });
69  
70  
71    // フェードインアニメ右から左
72    $(function () {
73      $(window).scroll(function () {
74        const windowHeight = $(window).height();
75        const scroll = $(window).scrollTop();
76  
77        $('.contents-hidden-right_side').each(function () {
78          const targetPosition = $(this).offset().top;
79          if (scroll > targetPosition - windowHeight + 100) {
80            $(this).addClass("contents-fadein-right_side");
81          }
82        });
83      });
84    });
85  
86    // フェードインアニメ左から右
87    $(function () {
88      $(window).scroll(function () {
89        const windowHeight = $(window).height();
90        const scroll = $(window).scrollTop();
91  
92        $('.contents-hidden-left_side').each(function () {
93          const targetPosition = $(this).offset().top;
94          if (scroll > targetPosition - windowHeight + 100) {
95            $(this).addClass("contents-fadein-left_side");
96          }
97        });
98      });
99    });
100  
101    // フェードインアニメそのまま出てくる
102    $(function () {
103      $(window).scroll(function () {
104        const windowHeight = $(window).height();
105        const scroll = $(window).scrollTop();
106  
107        $('.contents-hidden_out').each(function () {
108          const targetPosition = $(this).offset().top;
109          if (scroll > targetPosition - windowHeight + 100) {
110            $(this).addClass("contents-hidden_in");
111          }
112        });
113      });
114    });
115  
116    $(function () {
117      $('.first01,.children-menu01').hover(
118        function () {
119          $('#active01').addClass('active');
120        },
121        function () {
122          $('#active01').removeClass('active');
123        }
124      );
125    });
126    $(function () {
127      $('.first02,.children-menu02').hover(
128        function () {
129          $('#active02').addClass('active');
130        },
131        function () {
132          $('#active02').removeClass('active');
133        }
134      );
135    });
136    $(function () {
137      $('.first03,.children-menu03').hover(
138        function () {
139          $('#active03').addClass('active');
140        },
141        function () {
142          $('#active03').removeClass('active');
143        }
144      );
145    });
146  // スライド
147  //   $(window).on('load', function() {
148  //   $('.slide-items').slick({
149  //     dots: true, 
150  //     speed: 1000, 
151  //     slidesToShow: 1, 
152  //     centerMode: true, 
153  //     variableWidth: true, 
154  //     centerMode: true,
155  //     centerPadding: '10%',
156  //   });
157  // });
158
159// アコーディオンメニュー
160$(document).ready(function() {
161  $('.ac-label').on('click', function() {
162    var clickedMenu = $(this);
163    var clickedContent = clickedMenu.next('.ac-content');
164
165    $('.ac-content').not(clickedContent).slideUp();
166    $('.ac-label').not(clickedMenu).find('.icon').removeClass('open');
167
168    clickedContent.slideToggle();
169    clickedMenu.find('.icon').toggleClass('open');
170  });
171
172  $('.nav__openbtn').on('click', function() {
173    $('.ac-content').slideUp();
174    $('.ac-label .icon').removeClass('open');
175  });
176});
177
178// スライダー
179$(document).ready(function() {
180  if ($('.slide-items').length) { // 要素の存在確認
181    $('.slide-items').slick({
182      speed: 1000,
183      slidesToShow: 1,
184      fade: true,
185      prevArrow: '<button type="button" class="custom-arrow prev-arrow"></button>',
186      nextArrow: '<button type="button" class="custom-arrow next-arrow"></button>',
187      dots: true,
188    });
189  }
190});
191
192jQuery(function($) {
193  // フォームの送信ボタンを無効化
194  $('input[type="submit"]').prop('disabled', true);
195
196  // プライバシーポリシーの同意チェックボックスがクリックされた場合に、ボタンの無効化を切り替える
197  $('input[name="acceptance"]').on('click', function() {
198    if ($(this).is(':checked')) {
199      $('input[type="submit"]').prop('disabled', false);
200    } else {
201      $('input[type="submit"]').prop('disabled', true);
202    }
203  });
204});
205
206$(function() {
207  // Check if the animation already played
208  if (!localStorage.getItem('animationPlayed')) {
209      setTimeout(function(){
210          $('.start p').fadeIn(1600);
211      },1000); //0.5秒後にロゴをフェードイン!
212      setTimeout(function(){
213          $('.start').fadeOut(500);
214      },3500); //2.5秒後にロゴ含め真っ白背景をフェードアウト!
215
216      // Set the flag in local storage to prevent the animation from playing again
217      localStorage.setItem('animationPlayed', true);
218  } else {
219      // If the animation has already been played, hide the elements immediately
220      $('.start p').hide();
221      $('.start').hide();
222  }
223});
224
225// フェードインアニメ下から上
226$(function () {
227  $(window).scroll(function () {
228    const windowHeight = $(window).height();
229    const scroll = $(window).scrollTop();
230
231    $('.contents-hidden').each(function () {
232      const targetPosition = $(this).offset().top;
233      if (scroll > targetPosition - windowHeight + 100) {
234        $(this).addClass("fadein");
235      }
236    });
237  });
238});
239
240
241function BgFadeAnime(){
242
243  // 背景色が伸びて出現(左から右)
244$('.bgLRextendTrigger').each(function(){ //bgLRextendTriggerというクラス名が
245  var elemPos = $(this).offset().top-100;//要素より、50px上の
246  var scroll = $(window).scrollTop();
247  var windowHeight = $(window).height();
248  if (scroll >= elemPos - windowHeight){
249    $(this).addClass('bgLRextend');// 画面内に入ったらbgLRextendというクラス名を追記
250  }else{
251    // $(this).removeClass('bgLRextend');// 画面外に出たらbgLRextendというクラス名を外す
252  }
253}); 
254
255 // 文字列を囲う子要素
256$('.bgappearTrigger').each(function(){ //bgappearTriggerというクラス名が
257  var elemPos = $(this).offset().top-100;//要素より、50px上の
258  var scroll = $(window).scrollTop();
259  var windowHeight = $(window).height();
260  if (scroll >= elemPos - windowHeight){
261    $(this).addClass('bgappear');// 画面内に入ったらbgappearというクラス名を追記
262  }else{
263    // $(this).removeClass('bgappear');// 画面外に出たらbgappearというクラス名を外す
264  }
265});   
266}
267
268// 画面をスクロールをしたら動かしたい場合の記述
269$(window).scroll(function (){
270  BgFadeAnime();/* アニメーション用の関数を呼ぶ*/
271});// ここまで画面をスクロールをしたら動かしたい場合の記述
272
273// 画面が読み込まれたらすぐに動かしたい場合の記述
274$(window).on('load', function(){
275  BgFadeAnime();/* アニメーション用の関数を呼ぶ*/
276});// ここまで画面が読み込まれたらすぐに動かしたい場合の記述
277
278
279// LINE ボタン非表示
280$('.close-btn').click(function() {
281  $('.pamphlet-wrap').hide();
282});
283
284// スライドショー
285$(document).ready(function() {
286  if ($('.movie-slider').length) { // 要素の存在確認
287    $('.movie-slider').slick({
288      autoplay: true,
289      autoplaySpeed: 4000,
290      prevArrow: '<button class="slide-arrow prev-arrow"></button>',
291      nextArrow: '<button class="slide-arrow next-arrow"></button>',
292      slidesToShow: 3,
293      responsive: [
294        {
295          breakpoint: 800,
296          settings: {
297            slidesToShow: 1,
298          },
299        },
300      ],
301    });
302  }
303});
304
305});
306
307jQuery(function($) {
308  // ナビゲーションの開閉
309  $('.nav__openbtn').on('click', function(e) {
310      e.preventDefault();
311      console.log('nav clicked'); // デバッグ用
312      $(this).toggleClass('active');
313      $('#g-nav').toggleClass('panelactive');
314  });
315
316  // 外側をクリックした時に閉じる
317  $(document).on('click', function(e) {
318      if(!$(e.target).closest('.nav__openbtn, #g-nav').length) {
319          $('.nav__openbtn').removeClass('active');
320          $('#g-nav').removeClass('panelactive');
321      }
322  });
323});

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.