PageSourceSearch

https://www.secomtrust.net/assets/js/libs.js

js secomtrust.net collected 2026-10-02 03:08:26 UTC 2,909 bytes, 125 lines download raw bytes

1$(function() {
2	// ページ内スクロールリンク
3	$('a[href*=\\#]').click(function() {
4		if($(this.hash).length > 0) {
5			$(this.hash).each(function() {
6				$('html, body').animate({scrollTop: $(this).offset().top}, 500);
7			});
8		}
9	});
10
11	// 別ページからの遷移スクロールリンク
12	if (location.hash) {
13		var anchor = $(location.hash).offset().top;
14		$('html, body').scrollTop(0).animate({scrollTop: anchor}, 500);
15	}
16
17	/* Functionの実行
18	------------------------------*/
19	responsive();
20	imageWidth();
21	accordion();
22	imgModal()
23	linkTel();
24	tab();
25});
26
27/* リサイズ
28------------------------------*/
29var timer = false;
30$(window).resize(function() {
31	if (timer !== false) {clearTimeout(timer);}
32	timer = setTimeout(function() {
33		responsive();
34		imageWidth();
35		imgModal();
36		linkTel();
37		tab();
38	}, 10);
39});
40
41/* Function
42------------------------------*/
43// ブレイクポイント
44function responsive() {
45	var widthCurrent = window.innerWidth ? window.innerWidth: $(window).width();
46	var widthSmartphone = 768;
47
48	if (widthCurrent < widthSmartphone) {
49		modeSmartphone = true;
50	} else {
51		modeSmartphone = false;
52	}
53}
54
55// PC・SP:画像幅切り替え
56function imageWidth() {
57	$('[data-width]').each(function() {
58		var dataWidth = $(this).data('width');
59
60		if (modeSmartphone) {
61			$(this).css('max-width', dataWidth + 'px');
62		} else {
63			$(this).removeAttr('style');
64		}
65	});
66}
67
68// SP:電話番号にリンク付与
69function linkTel() {
70	$('[data-tel]').each(function() {
71		var dataTel = $(this).data('tel');
72
73		if (modeSmartphone) {
74			$(this).attr('href', 'tel:' + dataTel);
75		} else {
76			$(this).removeAttr('href');
77		}
78	});
79}
80
81// PC・SP:タブ切り替え
82function tab() {
83	var tab = $('.js-tabs li');
84	var content = $('.js-tabPanel')
85	let tabs = $('.js-tabs li'); 
86	
87	tab.on("click", function() {
88		$(".js-active").removeClass("js-active");
89		$(this).addClass("js-active");
90		const index = tabs.index(this);
91		content.removeClass("js-active").eq(index).addClass("js-active");
92	})
93	tab.on('keydown', function(e) {
94		if (e.key === 'Enter') {
95			$(".js-active").removeClass("js-active");
96			$(this).addClass("js-active");
97			const index = tabs.index(this);
98			content.removeClass("js-active").eq(index).addClass("js-active");
99		}
100	});
101}
102
103// PC・SP:アコーディオン
104function accordion() {
105	$('.js-accordion-header').click(function() {
106		$(this).next('.js-accordion-body').slideToggle(200);
107		$(this).toggleClass("js-accordion-open",200);
108	});
109	$('.js-accordion-header').on('keydown', function(e) {
110		if (e.key === 'Enter') {
111			$(this).next('.js-accordion-body').slideToggle(200);
112			$(this).toggleClass("js-accordion-open",200);
113		}
114	});
115}
116
117// PC・SP:イメージモーダル
118function imgModal() {
119	$('.js-imgPop').click(function() {
120		$(this).next('.js-imgPop-modal').show();
121	})
122	$('.js-imgPop-modal').click(function() {
123		$('.js-imgPop-modal').hide();
124	});
125}

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.