PageSourceSearch

https://www.tokyo-jinken.or.jp/ssi/js/toptab.js

js tokyo-jinken.or.jp collected 2026-10-02 07:43:35 UTC 1,853 bytes, 54 lines download raw bytes

1//タブ切り替え
2jQuery(document).ready(function($){
3
4	var commonEvent = 'click keypress';
5	var openTabNum = 0;
6	var isTabUseLocalStorage = false; //localstorageを使うときは true を入れてください
7	if(isTabUseLocalStorage){
8		// localStorage:ブラウザを閉じてもタブの情報は残ります
9		var openTabStatusStorage = localStorage;
10	}else{
11		// sessionStorage:ブラウザを閉じるとタブの情報は消えます
12		var openTabStatusStorage = sessionStorage;
13	}
14
15	function setTabStatus(){
16		if(openTabNum != null){
17			openTabStatusStorage.setItem('toppageTabStatus',openTabNum);
18		}
19	}
20	function getTabStatus(){
21		openTabNum = openTabStatusStorage.getItem('toppageTabStatus');
22		if(openTabNum == null){
23			openTabNum = 0;
24		}
25	}
26
27	function changeTabView(){
28			$('#top_tab_title li').removeClass('tab_on').eq(openTabNum).addClass('tab_on');
29			$('#top_tab_detail > div').removeClass('detail_on').hide().eq(openTabNum).addClass('detail_on').show();
30	}
31
32	$('#top_tab_detail > div').hide();	//タブ詳細を隠す
33	if (typeof sessionStorage !== 'undefined') {
34		// web strageが使える時
35		getTabStatus();
36		$('#top_tab_title li').removeClass('tab_on').eq(openTabNum).addClass('tab_on');
37		$('#top_tab_detail > div').removeClass('detail_on').hide().eq(openTabNum).addClass('detail_on').show();
38		$('#top_tab_title li').on(commonEvent,function(){
39			openTabNum = $('#top_tab_title li').index(this);
40			changeTabView();
41			setTabStatus();
42		});
43	}else{
44		// web strageが使えない時
45		openTabNum = 0;
46		$('#top_tab_title li:first-child').addClass('tab_on');
47		$('#top_tab_detail > div:first-child').addClass('detail_on').show();
48		$('#top_tab_title li').on(commonEvent,function(){
49			openTabNum = $('#top_tab_title li').index(this);
50			changeTabView();
51		});
52	}
53
54});

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.