PageSourceSearch

https://ku-do.or.jp/wp-content/themes/kudo/js/script.js

js ku-do.or.jp collected 2026-10-05 11:45:00 UTC 3,430 bytes, 150 lines download raw bytes

1$(function(){
2
3// ヘッダーナビ
4$(".openbtn").click(function () {
5  $(this).toggleClass('active');
6  $(".nav_content").toggleClass('active');
7});
8
9
10var  lock;
11
12function mediaQueriesWin(){
13  var width = $(window).width();
14
15  if(width <= 991) {
16 
17    $('.menu-item-has-children > a').click(function(){
18      var parentElem =  $(this).parent();
19      $(parentElem).toggleClass('active');
20      $(parentElem).children('ul').stop().slideToggle(500);
21      return false;
22 
23    }); 
24 
25  }else{
26    $('.menu-item-has-children').hover(function(){
27      $(this).addClass('active');
28      $(this).children('ul').stop().slideDown(500, function() {
29    });
30    },
31    function(){
32      $(this).removeClass('active');
33      $(this).children('ul').stop().slideUp(500, function() {
34    });
35    }
36    );
37  }
38}
39mediaQueriesWin();
40
41
42$(window).resize(function() {
43  mediaQueriesWin();
44});
45
46//ページ内スクロール
47$('a[href*="#"]').click(function () {
48//  var elmHash = $(this).attr('href');
49//  var pos = $(elmHash).offset().top-70;
50//  $('body,html').animate({scrollTop: pos}, 1000);
51//  return false;
52});
53
54
55//スクロールeffect
56$(window).scroll(function () {
57  var scrollAnimationElm = document.querySelectorAll('.scroll_up,.scroll_left,.scroll_right');
58  var scrollAnimationFunc = function () {
59    for (var i = 0; i < scrollAnimationElm.length; i++) {
60      var triggerMargin = 100;
61      if (window.innerHeight > scrollAnimationElm[i].getBoundingClientRect().top + triggerMargin) {
62        scrollAnimationElm[i].classList.add('on');
63      }
64    }
65  }
66  window.addEventListener('load', scrollAnimationFunc);
67  window.addEventListener('scroll', scrollAnimationFunc);
68});
69//所属協会
70    $('.ac_list .ac_header').click(function(){
71      $(this).children('.ac_inner').slideToggle();
72      $(this).toggleClass("open");
73    });
74//年別アーカイブリンク
75$('.lower_archive_list li span').click(function() {
76  $(this).next().slideToggle();
77  $(this).toggleClass('active');
78});
79
80
81// CTA アニメ
82if(window.matchMedia("(max-width: 767px)").matches){
83	$('#cta').addClass('animate__animated animate__fadeInUp');
84}else{ 
85	$('#cta').addClass('animate__animated animate__fadeInRight');
86}
87
88
89// ヘッダーロゴ色
90var headerH = $("header").outerHeight(true);
91var mvH = $("#mv").outerHeight(true);
92
93function FixedAnime() {
94	var scroll = $(window).scrollTop();
95	if (scroll >= mvH && !$('.nav_content').hasClass('active')){
96        $('header').addClass('header-scroll');
97	}else{
98        $('header').removeClass('header-scroll');
99	}    
100}
101
102$(window).scroll(function () {
103	FixedAnime();
104});
105
106});
107
108
109const mySwiper = new Swiper('.mv_slider .swiper', {
110  effect: 'fade',
111  fadeEffect: {
112    crossFade: true,
113  },
114  loop: true,
115  loopAdditionalSlides: 1,
116  speed: 3000,
117  autoplay: {
118    delay: 5000,
119    disableOnInteraction: false,
120    waitForTransition: false,
121  },
122  followFinger: false,
123});
124
125
126  const specialSwiper = new Swiper('.special-slide .swiper', {
127    slidesPerView: 1.5,
128    spaceBetween: '5%',
129    loop: true,
130    loopAdditionalSlides: 1,
131    speed: 1000,
132	centeredSlides: true,
133    grabCursor: true,
134    watchSlidesProgress: true,
135    navigation: {
136      nextEl: '.special-slide .swiper-button-next',
137      prevEl: '.special-slide .swiper-button-prev',
138    },
139    breakpoints: {
140      600: {
141        slidesPerView: 1.5,
142      },
143      1025: {
144		centeredSlides: false,
145        slidesPerView: 2.5,
146      }
147    },
148  });
149
150

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.