PageSourceSearch

https://www.biodic.go.jp/common/js/run.js

js biodic.go.jp collected 2026-10-02 03:04:32 UTC 5,171 bytes, 227 lines download raw bytes

1// JavaScript Document
2//自然環境保全基礎調査 上部表の選択
3$(document).ready( function(){
4	$.each($('table.kiso td a'), function() {
5		console.log(this.href);
6		if(location.href==this.href){
7			console.log('now//'+location.href+"------link//"+this.href);
8			$(this).children('span').unwrap();
9		}
10	});
11});
12
13//トップ標本・ライブ画像のイメージ切り替え
14$(function(){
15	var maxNum = 15, // 最大枚数
16	rdm = Math.floor(Math.random()*(maxNum))+1;
17	$('img#live_link').attr('src', '/common/images/top_img_live_' + rdm + '.png');
18});
19
20$(function(){
21	var maxNum = 8, // 最大枚数
22			rdm = Math.floor(Math.random()*(maxNum))+1;
23	$('img#hyohon_link').attr('src', '/common/images/top_img_hyohon_' + rdm + '.png');
24});
25
26//ヘッダーのイメージ切り替え
27$(function() {
28	var array = [
29		"/common/images/common/img_key_01_a_1.png",
30		"/common/images/common/img_key_01_a_2.png",
31		"/common/images/common/img_key_01_a_3.png",
32		"/common/images/common/img_key_01_a_4.png" 
33	];
34
35	var l = array.length;
36	var r = Math.floor(Math.random()*l);
37	var bgimgurl = array[r];
38	$(".header_a").css('background',('url("'+bgimgurl+'") no-repeat center bottom'));
39});
40
41//グローバルナビの閉開
42$(function () {
43	$("ul.glo_nav_menu").children("li").hover(function () {
44		$(this).children("ul:not(:animated)").slideDown("fast");
45	},
46	function () {
47		$(this).children("ul").slideUp("fast");
48	});
49
50//メガドロップダウン(jQuery-menu-aim)
51var $menu = $("ul#mega-menu");
52$menu.menuAim({
53	activate: activateSubmenu,
54	deactivate: deactivateSubmenu
55});
56function activateSubmenu(row) {
57	var $row = $(row),
58			submenuId = $row.data("submenuId"),
59			$submenu = $("#" + submenuId);
60
61	// Show the submenu
62	$submenu.stop().slideDown("fast");
63
64}
65function deactivateSubmenu(row) {
66	var $row = $(row),
67			submenuId = $row.data("submenuId"),
68			$submenu = $("#" + submenuId);
69	
70	// Hide the submenu and remove the row's highlighted look
71	$submenu.stop().slideUp("fast");
72	
73}
74
75});	
76
77
78$(function(){
79 //ローカルナビの開閉
80 $('.local_nav dt').click(function(){
81  if($(this).hasClass('closed')){
82		$(this).next('dd').slideDown('fast');
83   $(this).removeClass('closed');
84  }else{
85		$(this).next('dd').slideUp('fast');
86   $(this).addClass('closed');
87  }
88 });
89	
90	$('.local_nav dd ul .sub div').click(function() {
91		$(this).next('ul:not(:animated)').slideToggle('fast');
92	});
93	
94	
95	$('.local_nav dd ul li').not('.sub').click(function() {
96		$(this).siblings("li.sub").children("ul").slideUp('fast');
97	});
98
99
100	$(document).ready( function(){
101    $.each($('.local_nav dd a'), function() {
102        //console.log(this.href);
103        if(location.href==this.href){
104          //console.log('now//'+location.href+"------link//"+this.href);
105					$(this).parents("dd").prev("dt").click();
106					//$(this).parents(".sub").children("div").click();
107        }
108    });
109	});
110
111	
112
113	
114});   
115 
116
117$(function(){
118 //スクロール系
119 $(window).scroll(function(){
120  var scrTop=$(window).scrollTop();
121
122  if(scrTop>0){
123   $('.pagetop').fadeIn('fast');
124  }else{
125   $('.pagetop').fadeOut('fast');
126  }
127 });
128});
129 
130 //モジュールの全選択
131$(function(){
132 $('.module_textarea').each(function(){
133  $(this).focus(function(){
134   $(this).select();
135  }).click(function(){
136   $(this).select();
137   return false;
138  });
139 });
140});
141
142$(function(){
143//tableの網掛け処理
144$("table").each(function(){
145    $(this).find("tr:even").addClass("even");//奇数
146  });
147$("table").each(function(){
148    $(this).find("tr:odd").addClass("odd");//偶数
149  });
150
151	//自然系調査研究機関連絡会議(NORNAC)構成機関一覧用 tableの網掛け処理
152	$("table.nornac").each(function(){
153		$(this).find("tr td:nth-child(3)").addClass("noborder");
154	});
155	$("table.nornac").each(function(){
156		$(this).find("tr td:nth-child(4)").addClass("noborder");
157	});
158	$("table.nornac").each(function(){
159		$(this).find("tr td:nth-child(5)").addClass("noborder");
160	});
161});
162	
163
164
165//webgis用
166$(function(){
167  //初期表示
168  var w = $(window).width();
169  var wInner = w - 341 - 40;
170  $('.plus_nav').css('width', wInner);  
171
172  //可変する時  
173  $(window).resize(function(){
174    var w = $(window).width();
175    var wInner = w - 341 - 40;
176    $('.plus_nav').css('width', wInner);
177  });
178});
179
180$(function(){
181	$('.layout_banner .layout_banner_list div:odd').addClass('no_margin');
182});
183
184$(function(){
185	$('.info_link ul li:nth-child(even)').addClass('even');
186});
187
188$(function(){
189	$('.info_link ul li:nth-last-child(1)').addClass('last');
190});
191
192
193/*
194$(function(){
195	//h2の高さ調整
196	$('h2').each(function(){
197		if(($(this).next().get(0).tagName!='p' && $(this).next().get(0).tagName!='P') && $(this).next().hasClass('txt_box')!=true){
198			$(this).addClass('notTxt');
199		}
200	});
201});
202
203*/
204
205//クリッカブル・マップのレスポンシブ対応→/relatedinst/rinst_main.htmlに直接記述
206/*
207$(function(){
208	$(document).ready(function(e) {
209		$('img[usemap]').rwdImageMaps();
210	});
211});
212*/
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227

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.