PageSourceSearch

https://abio.jp/blog/wp-content/themes/abio/2024/js/script.js?1744679700

js abio.jp collected 2026-10-02 14:34:34 UTC 10,604 bytes, 498 lines download raw bytes

1$(function(){
2
3
4	// 横幅取得
5	var w = $(window).width();
6
7
8	/*=======================================
9	スムーズスクロール
10	=========================================*/
11	var hHeight = $('.l-header24').innerHeight();
12	var scrollOffset = hHeight;
13	$('a[href^="#"]').click(function(){
14		var offsetTop = $($(this).attr('href')).offset().top-hHeight;
15		if($(this).attr('href')=='#container'){
16			offsetTop = 0;
17		}
18		$('html,body').stop().animate({scrollTop: offsetTop}, 500, 'swing');
19		return false;
20	});
21
22	if(location.hash){
23		$(window).on('load',function(){
24			$('html,body').scrollTop($(location.hash).offset().top-hHeight);
25		});
26	}
27
28
29
30	/*=======================================
31	ページトップへ戻る
32	=========================================*/
33	// var gotop = $('.l-pagetop');
34	// gotop.hide();
35	// $(window).scroll(function(){
36	// 	if($(window).scrollTop()>500) gotop.fadeIn();
37	// 	else gotop.fadeOut();
38	// });
39
40	// $('.l-pagetop').click(function(){
41	// 	$('html,body').stop().animate({scrollTop: 0}, 500, 'swing');
42	// 	return false;
43	// });
44
45
46
47	/*=======================================
48	アコーディオン
49	=========================================*/
50	$('.js-accordion-trigger').click(function(){
51		$(this).toggleClass('is-open').next('.js-accordion-content').stop().slideToggle();
52	});
53
54
55
56	/*=======================================
57	フッター スライドバナー
58	=========================================*/
59	if($('.l-footer24__banner .slider li').length){
60		$('.l-footer24__banner .slider ul').slick({
61			autoplay: true,
62			dots: false,
63			slidesToShow: 3,
64			centerMode: true,
65			centerPadding: "20px",
66			variableWidth: true,
67			swipeToSlide: true,
68			responsive: [{
69				breakpoint: 768,
70				settings: {
71					slidesToShow: 1,
72					variableWidth: false,
73					centerMode: false,
74					centerPadding: "0",
75				}
76			}]
77		});
78	}
79
80
81
82	/*=======================================
83	トップページ
84	=========================================*/
85	if($('.p-top24').length){
86
87
88		// KV
89		if($('.p-top24__kv .slider li').length){
90			$('.p-top24__kv .slider ul').slick({
91				autoplay: true,
92				dots: false,
93				arrows: false,
94				fade: true,
95			});
96		}
97
98		// トピックス
99		if($('.p-top24__topics .content .slider li').length){
100			$('.p-top24__topics .content .slider ul').slick({
101				autoplay: true,
102				dots: false,
103				arrows: true,
104				// asNavFor: '.p-top24__topics .content .thumb ul',
105				centerMode: true,
106				slidesToShow: 3,
107				variableWidth: true,
108				swipeToSlide: true,
109				responsive: [{
110					// breakpoint: 768,
111					// settings: {
112					// 	slidesToShow: 1,
113					// 	variableWidth: false,
114					// 	centerMode: false,
115					// }
116                    breakpoint: 768,
117                    settings: {
118                        centerMode: true,
119                        centerPadding: '10px',
120                        slidesToShow: 1,
121                        slidesToScroll: 1,
122                        rows: 2,
123                        slidesPerRow: 1,
124						variableWidth: false,
125                    }
126				}]
127			});
128			// $('.p-top24__topics .content .thumb ul').slick({
129			// 	autoplay: true,
130			// 	dots: false,
131			// 	arrows: false,
132			// 	asNavFor: '.p-top24__topics .content .slider ul',
133			// 	centerMode: true,
134			// 	slidesToShow: 8,
135			// 	focusOnSelect: true,
136			// 	variableWidth: true,
137			// 	swipeToSlide: true,
138			// });
139		}
140
141		// feature
142		if($('.p-top24__feature .img1 li').length){
143			$('.p-top24__feature .img1 ul').slick({
144				autoplay: true,
145				dots: false,
146				arrows: false,
147				fade: true,
148				pause: 4000,
149				speed: 1000
150			});
151		}
152
153		// BLOG & NEWS
154		$('.p-top24__blog .tab li').click(function(){
155			$('.p-top24__blog .tab li,.p-top24__blog .content').removeClass('is-active');
156			var blogTabClass = $(this).attr('class');
157			$(this).addClass('is-active');
158			$('.p-top24__blog .content').stop().hide().children('ul').slick('unslick');
159			$('.p-top24__blog .content.'+blogTabClass).addClass('is-active').stop().fadeIn().children('ul').slick({
160				autoplay: true,
161				dots: true,
162				arrows: true,
163				centerMode: true,
164				centerPadding: '20px',
165				slidesToShow: 3,
166				swipeToSlide: true,
167				responsive: [{
168					breakpoint: 768,
169					settings: {
170						slidesToShow: 1,
171						variableWidth: false,
172						centerMode: false,
173					}
174				}]
175			});
176		});
177
178
179		if($('.p-top24__blog .content li').length){
180			$('.p-top24__blog .content ul').slick({
181				autoplay: true,
182				dots: true,
183				arrows: true,
184				centerMode: true,
185				centerPadding: '20px',
186				slidesToShow: 3,
187				swipeToSlide: true,
188				responsive: [{
189					breakpoint: 768,
190					settings: {
191						slidesToShow: 1,
192						variableWidth: false,
193						centerMode: false,
194					}
195				}]
196			});
197		}
198
199		// Instagram
200		if($('.p-top24__sns .tab').length){
201			$('.p-top24__sns .tab li').click(function(){
202				$('.p-top24__sns .tab li,.p-top24__sns .tab-content').removeClass('is-active');
203				var snsTabClass = $(this).attr('class');
204				$(this).addClass('is-active');
205				$('.p-top24__sns .tab-content').stop().hide();
206				$('.p-top24__sns .tab-content.'+snsTabClass).stop().fadeIn();
207			});
208		}
209
210
211	}
212
213
214
215	/*=======================================
216	学科ページ
217	=========================================*/
218	if($('.p-course').length){
219
220
221		// カリキュラム
222		$('.p-course__curriculum .pickup .img1').each(function(){
223			$(this).find('ul').slick({
224				autoplay: true,
225				dots: true,
226				arrows: false,
227			});
228		});
229
230		// コース
231		$('.p-course__curriculum .course-block1').each(function(){
232			var courseImg = $(this).find('.course-img1');
233			var courseText = $(this).find('.course-slidetxt');
234			courseImg.slick({
235				autoplay: true,
236				dots: false,
237				arrows: false,
238				asNavFor: courseText
239			});
240			courseText.slick({
241				fade: true,
242				autoplay: true,
243				dots: true,
244				arrows: false,
245				asNavFor: courseImg
246			});
247		});
248
249	}
250
251
252
253	/*=======================================
254	よくある質問
255	=========================================*/
256	if($('.p-faq').length){
257
258	}
259
260
261
262	/*=======================================
263	オープンキャンパス詳細ページ
264	=========================================*/
265	if($('.p-oc_notice').length){
266
267		// 参加者の声
268		if($('.p-oc_notice__voice .content li').length){
269			$('.p-oc_notice__voice .content ul').slick({
270				autoplay: true,
271				dots: true,
272				arrows: true,
273				centerMode: true,
274				centerPadding: '24px',
275				slidesToShow: 1,
276				swipeToSlide: true,
277				variableWidth: true,
278				responsive: [{
279					breakpoint: 768,
280					settings: {
281						slidesToShow: 1,
282						variableWidth: false,
283						centerMode: false,
284					}
285				}]
286			});
287		}
288
289	}
290
291
292
293
294	if(w>767){// PCでの処理
295
296
297		/*=======================================
298		メニュー プルダウン
299		=========================================*/
300		$('.js-pulldown').hover(
301			function(){
302				$(this).addClass('is-open').find('.js-pulldown-content').stop().slideDown();
303			},
304			function(){
305				$(this).removeClass('is-open').find('.js-pulldown-content').stop().slideUp();
306			}
307		);
308
309
310
311		/*=======================================
312		トップページ
313		=========================================*/
314		if($('.p-top').length){
315
316
317
318		}
319
320
321
322
323	} else {// SPでの処理
324
325
326		/*=======================================
327		スマホメニュー
328		=========================================*/
329		$('.l-header24__btn').click(function(){
330			$(this).toggleClass('is-open');
331			$('.l-header24__menu').stop().fadeToggle();
332		});
333
334		$('.l-header24__menu a[href^="#"]').click(function(){
335			// console.log('a');
336			$('.l-header24__btn').removeClass('is-open');
337			$('.l-header24__menu').stop().fadeOut();
338		});
339
340
341		/*=======================================
342		メニュー プルダウン
343		=========================================*/
344		$('.js-pulldown').click(function(){
345			$(this).toggleClass('is-open').find('.js-pulldown-content').stop().slideToggle();
346		});
347
348
349
350
351
352		/*=======================================
353		トップページ
354		=========================================*/
355		if($('.p-top').length){
356
357
358
359		}
360
361
362
363	}
364
365
366});
367
368
369
370
371$(window).on('load', function(){// ロード完了時に処理
372
373	// 横幅取得
374	var w = $(window).width();
375
376
377
378	/*=======================================
379	要素が表示されたらアニメーション
380	=========================================*/
381	$('[class*="js-animate"]').each(function(){
382		var dy = $(window).scrollTop(); //y座標を取得
383		var connect = $(this);
384		var position = connect.offset().top - dy; //.itemのpositionを取得
385		var actionYposition = 120; //アクション発生のY座標の指定
386		//var windowHeight = $(window).height() - actionYposition;
387		var windowHeight = $(window).height() / 2;
388
389		arrivalAction();
390
391		$(window).scroll(function(){
392			arrivalAction();
393		});
394
395		//表示アクション
396		function arrivalAction(){
397			var dy = $(window).scrollTop(); //y座標を取得
398			var position = connect.offset().top - dy; //.itemのpositionを取得
399			//var windowHeight = $(window).height() - actionYposition;
400			var windowHeight = $(window).height() / 2;
401			if(position < windowHeight) connect.addClass('is--animate');
402		}
403	});
404
405	$('[class*="js-hidden-animate"]').each(function(){
406		var dy = $(window).scrollTop(); //y座標を取得
407		var connect = $(this);
408		var position = connect.offset().top - dy; //.itemのpositionを取得
409		var actionYposition = 120; //アクション発生のY座標の指定
410		//var windowHeight = $(window).height() - actionYposition;
411		var windowHeight = $(window).height() - 100;
412
413		arrivalHiddenAction();
414
415		$(window).scroll(function(){
416			arrivalHiddenAction();
417		});
418
419		//非表示アクション
420		function arrivalHiddenAction(){
421			var dy = $(window).scrollTop(); //y座標を取得
422			var position = connect.offset().top - dy; //.itemのpositionを取得
423			//var windowHeight = $(window).height() - actionYposition;
424			var windowHeight = $(window).height()  - 100;
425			if(position < windowHeight) connect.addClass('is--animate');
426		}
427	});
428
429
430	if(w>767){// PCでの処理
431
432
433
434	} else {// SPでの処理
435
436
437
438	}
439
440
441
442
443});
444
445
446
447
448$(window).on('scroll', function(){// リサイズ時に処理
449
450	// 横幅取得
451	var w = $(window).width();
452
453
454
455	if(w>767){// PCでの処理
456
457
458		/*=======================================
459		ヘッダー 横スクロール対応
460		=========================================*/
461		// $('#container').css('left', -$(window).scrollLeft());
462
463
464
465	} else {// SPでの処理
466
467
468
469	}
470
471});
472
473
474
475
476$(window).on('load resize', function(){// ロード完了、リサイズ時に処理
477
478	// 横幅取得
479	var w = $(window).width();
480
481
482	if(w>767){// PCでの処理
483
484
485
486	} else {// SPでの処理
487
488
489
490	}
491
492
493});
494
495
496
497
498

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.