PageSourceSearch

https://www.saintia-sho.com/lib/js/common.js

js saintia-sho.com collected 2026-10-02 19:28:32 UTC 2,987 bytes, 91 lines download raw bytes

1var path;
2
3$(function(){
4	
5	/* ナビゲーションカレント表示処理
6	-----------------------------------------------------*/
7  path = window.location.pathname;
8	
9	//グローバルナビ
10	if ($('body').hasClass('news')) {
11		$('.nav-area .nav li a[href*="news"]').addClass('active');
12	} else if ($('body').hasClass('information')) {
13		$('.nav-area .nav li a[href*="information"]').addClass('active');
14	} else if ($('body').hasClass('episode')) {
15		$('.nav-area .nav li a[href*="episode"]').addClass('active');
16	} else if ($('body').hasClass('character')) {
17		$('.nav-area .nav li a[href*="character"]').addClass('active');
18	} else if ($('body').hasClass('onair')) {
19		$('.nav-area .nav li a[href*="onair"]').addClass('active');
20	} else if ($('body').hasClass('music')) {
21		$('.nav-area .nav li a[href*="music"]').addClass('active');
22	}
23	
24	//ローカルナビ
25	$('.local-navi-area .local-navi li a').each(function(){
26		var href = $(this).attr('href');
27		if (path === href) {
28			$(this).addClass('active');
29		}	
30	});
31	
32	/* SPバーガーメニュー
33	-----------------------------------------------------*/
34  var current_scrollY; //スクロール位置を格納
35	$('#burgerMenuBtn').on('click',function(){
36		$('#burgerMenu').fadeToggle().toggleClass('open');
37		if ($('#burgerMenu').hasClass('open')) {
38			//背景のスクロール抑制
39			current_scrollY = $(window).scrollTop();
40			$('#wrapper').css({
41					position: 'fixed',
42					width: '100%',
43					top: -1 * current_scrollY
44			});
45		} else {
46			//背景のスクロール抑制停止
47			$('#wrapper').attr({
48					style: ''
49			});
50			$('html, body').prop({
51					scrollTop: current_scrollY
52			});
53		}
54	});
55	
56	/* PC用飾り罫枠に高さを適用
57	-----------------------------------------------------*/
58	var $frameInner = $('body.pc .frame-area .frame-inner');
59	var adjustVal;
60	if ($('body').hasClass('news') || $('body').hasClass('information')) {
61		adjustVal = 228;
62	} else {
63		adjustVal = 199;
64	}
65	$(window).on('load resize', function(){
66		var ornamentFrameHeight = $frameInner.height() - adjustVal;
67		$('body.pc #frameAdjustHeight').remove();
68		$frameInner.append('<style id="frameAdjustHeight">body.pc .frame-area .frame-inner:before {height:'+ornamentFrameHeight+'px!important;}</style>');
69	});
70	
71	/* smooth scroll
72	-----------------------------------------------------*/
73	$('[href^="#"]').click(function() {
74		if ($('#burgerMenuBtn').css('display') == 'block') {
75			// SPの処理
76			headerHeight = 70; //ヘッダの高さ
77		} else {
78			// PC・TABの処理
79			headerHeight = 0; //ヘッダの高さ
80		} // endIf		
81		var speed = 800;
82		var href = $(this).attr("href");
83		var target = $(href == "#" || href == "" ? 'html' : href);
84		var position = target.offset().top - headerHeight; //ヘッダの高さ分位置をずらす
85		$("html, body").animate({
86				scrollTop: position
87		}, speed, "swing");
88		return false;
89	});
90	
91});

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.