PageSourceSearch

https://www.niad.ac.jp/themes/site2016/js/nav.js?date=20231025115419

js niad.ac.jp collected 2026-10-01 11:32:21 UTC 1,700 bytes, 78 lines download raw bytes

1;(function ($) {
2	'use strict';
3
4	// breakpoint
5	var breakPoint = 1025;
6
7	// リサイズ関数
8	// リサイズ時に1回だけ機能を実行したい時に使用
9	var resize = function(callback) {
10		var fixed_timer = 0;
11		$(window).on('resize',function(){
12			if (fixed_timer > 0) {
13				clearTimeout(fixed_timer);
14			};
15			fixed_timer = setTimeout(function(){
16				// 実行
17				callback();
18			}, 200);
19		});
20	};
21
22	function clickMenu(){
23
24		//global nav
25		var btn  = $('.dropdownMenu .js-link_match_location .a_icon');
26		var menu = $('.dropdownMenu .js-link_match_location');
27
28		// addClass
29		var icon = '.accordion_icon';
30		var addClassName = 'active';
31
32		//click
33		$(btn).on('click.clickDrower', function(event){
34
35			// ウインドウサイズがブレイクポイントより大きい場合、実行しない
36			var w = $(window).width();
37			if ( w > breakPoint ) {
38				return false;
39			};
40
41			var shownav = $(this).next('a').next('.dropdownMenu_child');
42			var btn2 = $(this).children('a');
43
44			btn.find(icon).removeClass(addClassName);
45
46			$('.dropdownMenu .dropdownMenu_child').each(function() {
47				// $(this).hide();
48				if ( $(this) != shownav ){
49					$(this).slideUp('fast');
50				};
51			});
52
53			if($(shownav).css('display')=='none'){
54				$(shownav).slideDown('fast');
55				$(btn2).children(icon).addClass(addClassName);
56			} else {
57				$(shownav).slideUp('fast');
58				$(btn2).children(icon).removeClass(addClassName);
59			};
60
61			event.preventDefault();
62		});
63
64	};
65
66	$(function(){
67		clickMenu();
68	});
69
70	resize(function(){
71		var w = $(window).width();
72		if ( w > breakPoint ) {
73			$('.dropdownMenu_child').attr('style','');
74			$('.accordion_icon').removeClass('active');
75		};
76	});
77
78})(jQuery);

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.