PageSourceSearch

https://www.jst.go.jp/common/js/common.js

js jst.go.jp collected 2026-09-24 06:43:28 UTC 5,455 bytes, 188 lines download raw bytes

1///// IE8-IE10対応 /////
2function alertIE(){
3		var ua = navigator.userAgent;
4		if ( ua.indexOf('MSIE 8') !== -1 || ua.indexOf('MSIE 9') !== -1 || ua.indexOf('MSIE 10') !== -1) {
5				$('body').prepend(
6						'<div class="IE">お使いのInternet Explorerは古いバージョンのため、ホームページが正しく表示されない可能性があります。<br>最新のバージョンにアップデートするか、別のブラウザからご利用ください。</div>'
7				);
8		}
9}
10
11//PCメガドロップダウン
12$(document).ready(function () {
13	//"use strict";
14	$('.navGlobal > li:has(ul) > a').before("<span class=\"open_icn\"></span>");
15	$('.navGlobal > li:not(:has(ul))').addClass('arw_icn');
16	$(".menu-container").before("<button class=\"dl-trigger\">Open Menu<span></span><span></span><span></span><img src=\"/common/img/common/icn_spnav.svg\" alt=\"メニューボタン\"></button>");
17	$(".navGlobal > li").hover(function (e) {
18		if ($(window).width() > 680) {
19			$(this).addClass('hover');
20			$(this).children('.MegaDrop').fadeIn(100);
21			no_scroll();
22			// e.preventDefault();
23		};
24	}, function (e) {
25		if ($(window).width() > 680) {
26			$(this).removeClass('hover');
27			$('.MegaDrop').fadeOut(100);
28			return_scroll();
29			return false;
30			// e.preventDefault();
31		}
32	});
33	$('.megaNavClose').on('click',function() {
34		$('.MegaDrop').hide();
35		return_scroll();
36		return false;
37	});
38
39//スマホアコーディオンメニュー
40	$(function(){
41		$('.dl-trigger').click(function(){
42			$('.menu').fadeToggle(500);
43			$('.dl-trigger').toggleClass('active');
44			$('body,html').toggleClass('fixbody');
45		});
46		$('.close').click(function(){
47			$('.menu').fadeToggle(500);
48			$('.dl-trigger').toggleClass('active dl-active');
49		});
50		$('.navAnchor').click(function(){
51			if ($(window).width() < 680) {
52				$('.menu').fadeToggle(500);
53				$('.dl-trigger').toggleClass('active dl-active');
54				$('body,html').toggleClass('fixbody');
55			};
56		});
57		$('.open_icn').click(function(){
58				$(this).toggleClass('active').nextAll(".MegaDrop").slideToggle(500);
59			});
60	});
61
62});
63
64		//スクロール停止
65		function no_scroll(dom){
66				var scroll_event = 'onwheel' in document ? 'wheel' : 'onmousewheel' in document ? 'mousewheel' : 'DOMMouseScroll';
67				$(document).on(scroll_event,function(e){e.preventDefault();});
68		}
69
70		//スクロール作動
71		function return_scroll(){
72				var scroll_event = 'onwheel' in document ? 'wheel' : 'onmousewheel' in document ? 'mousewheel' : 'DOMMouseScroll';
73				$(document).off(scroll_event);
74		}
75
76//ページトップJS
77$(function() {
78	var topBtn = $('#page-top');
79	topBtn.hide();
80	//スクロールが100に達したらボタン表示
81	$(window).scroll(function () {
82		if ($(this).scrollTop() > 100) {
83			topBtn.fadeIn();
84		} else {
85			topBtn.fadeOut();
86		}
87	});
88	//スクロールしてトップ
89	topBtn.click(function () {
90		$('body,html').animate({
91			scrollTop: 0
92		}, 600);
93		return false;
94	});
95});
96
97//スムーズスクロール
98$(function(){
99	// #で始まるアンカーをクリックした場合に処理
100	jQuery('a[href^="#"]:not(.non-scroll)').click(function() {
101		// スクロールの速度
102		var speed = 800; // ミリ秒
103		// アンカーの値取得
104		var href= jQuery(this).attr("href");
105		// 移動先を取得
106		var target = jQuery(href == "#" || href == "" ? 'html' : href);
107		// 移動先を数値で取得
108		var position = target.offset().top;
109		// スムーススクロール
110		jQuery('body,html').animate({scrollTop:position}, speed, 'swing');
111	});
112});
113
114//telタグPC無効
115var ua = navigator.userAgent;
116if (ua.indexOf('iPhone') < 0 && ua.indexOf('Android') < 0) {
117	$('a[href^="tel:"]').css('cursor', 'default').click(function (event) {
118		event.preventDefault();
119	});
120}
121
122//ViewPort切り替え
123$(function(){
124	var ua = navigator.userAgent;
125	if((ua.indexOf('iPhone') > 0) || ua.indexOf('iPod') > 0 || (ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0)){
126		$('head').prepend('<meta name="viewport" content="width=device-width,initial-scale=1">');
127	} else {
128		$('head').prepend('<meta name="viewport" content="width=1000">');
129	}
130});
131
132//事業紹介アコーディオン
133$(document).ready(function () {
134	$(function(){
135		$('.AC_btn').click(function(){
136			$(this).next().slideToggle("slow");
137				if ($(this).hasClass('ac_active')) {
138				$(this).removeClass('ac_active');
139				}
140				else {
141				$(this).addClass('ac_active');
142				}
143		});
144	});
145
146});
147
148
149
150$(document).ready(function (){
151		$('.all_put').on('click', function(){
152			$(".AC_btn").next().slideToggle("slow");
153				if ($(".AC_btn").hasClass('ac_active')) {
154				$(".AC_btn").removeClass('ac_active');
155				}
156				else {
157				$(".AC_btn").addClass('ac_active');
158				
159				}
160		})
161});
162
163
164
165
166//サイドメニューアコーディオン
167$(document).ready(function () {
168	$(function(){
169		$('.nav_more').click(function(){
170			$('.list_nav_more').fadeToggle(500);
171			$('.nav_more').toggleClass('active');
172		});
173	});
174
175});
176
177//Googleアナリティクス4 2022.06.23
178document.write('
vendor: 63 bytes, line 178
178<script async src="https://www.googletagmanager.com/gtag/js?id=
178G-HZS35WBP83
vendor: 11 bytes, line 178
178"></script>
178');
179  
vendor: 138 bytes, lines 179-183
179window.dataLayer = window.dataLayer || [];
180  function gtag(){dataLayer.push(arguments);}
181  gtag('js', new Date());
182
183  gtag('config', '
183G-HZS35WBP83
vendor: 7 bytes, lines 183-184
183');
184  
184gtag('config', 'UA-124371163-1');
185
186
187
188

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.