PageSourceSearch

https://www.endoshokai.co.jp/fire_lp/assets/js/common.js

js endoshokai.co.jp collected 2026-10-02 19:01:45 UTC 7,660 bytes, 202 lines download raw bytes

1/*******************************************/
2/********** ArtLab-Tokyo [Script] **********/
3/*******************************************/
4
5
6//ダミーリンク用設定(リンクの無効化)
7$(function () {
8	$('a[href="#dummy"]').on('click', function () {
9		return false;
10	})
11});
12
13
14//ローディング
15$(window).on('load', function () {
16	$('.loading').delay(500).fadeOut(1500);
17});
18//読み込みが終わらない場合は10秒でローディング画面を強制フェードアウト -
19function loaderClose() {
20	$('.loading').fadeOut('slow');
21}
22setTimeout('loaderClose()', 10000);
23
24
25//WOW.js 設定
26wow = new WOW({
27	offset: 0, //ブラウザのビューポート下部からのオフセット量(単位px) -
28	mobile: true, //モバイルデバイス動作ON(true),OFF(false) -
29	live: true //常時検知チェック動作ON(true),OFF(false) -
30})
31wow.init();
32
33$(window).on('load', function () {
34$('body').fadeIn(0);
35});
36
37
38//StellarNav.js 設定
39$(function () {
40	$('.stellarnav').stellarNav({
41		theme: 'plain', //カラーテーマ ('plain','light','dark') -
42		breakpoint: 767, //モバイル表示のブレイクポイント -
43		menuLabel: '', //モバイル表示時のメニューのテキストラベル ('テキスト') -
44		sticky: false, //ナビゲーションのスティッキーエフェクト (true,false) ※PC表示時のみ -
45		position: 'right', //モバイル表示時のメニュー位置 ('static','top','left','right') -
46		//※'top'に設定すると、モバイルメニューはページの一番上に配置 -
47		//※'left'または'right'に設定すると、モバイルメニューは左または右からフェードインアウト -
48		openingSpeed: 100, //ドロップダウン開閉速度 (単位ms) -
49		closingDelay: 0, //ドロップダウンが閉じる際の遅れ (単位ms) -
50		showArrows: true, //サブメニューがある項目の横に矢印を表示 (true,false) -
51		phoneBtn: '', //電話リンクをメニューの上部に追加 ('電話番号') -
52		phoneLabel: 'Call Us', //電話リンクボタンのテキストラベル ('テキスト') -
53		locationBtn: '', //位置情報リンクをメニューの上部に追加 ('位置情報リンク先のパス') -
54		locationLabel: 'Location', //位置情報リンクボタンのテキストラベル ('テキスト') -
55		closeBtn: false, //ナビゲーションの最後に閉じるボタンを追加 (true,false) -
56		//※position:'static'or'top'時のみ -
57		closeLabel: ' Close', //閉じるボタンのテキストラベル ('テキスト') -
58		mobileMode: false, //デフォルトでメニューをモバイル表示 (true,false) -
59		scrollbarFix: false //横長メニューでの水平スクロールバー表示 (true,false) -
60	});
61	//CLOSEボタン押下時に開いているドロップダウンメニューを閉じる -
62	$('.stellarnav.mobile a.close-menu, .stellarnav.mobile a.menu-toggle').on('click', function () {
63		$('.stellarnav.mobile .open > a.dd-toggle').click();
64	});
65	//リンク押下時にメニュー(開いているドロップダウンメニューを含む)を全て閉じる -
66	$('.stellarnav.mobile ul li a:not(.dd-toggle), .stellarnav.mobile ul div a, nav a.navbar-logo').on('click', function (event) {
67		event.preventDefault();
68		var linkUrl = $(this).attr('href');
69		$('.stellarnav.mobile .open > a.dd-toggle').click();
70		$('.stellarnav.mobile ul').hide();
71		location.href = linkUrl;
72	});
73});
74
75
76//スムーススクロール
77$(function () {
78	var sclpos = $('header').outerHeight() - 1; //オフセット量(navの高さ(単位px)を自動取得) -
79	var scldurat = 1000; //スクロールの速度(単位ms) -
80	//アンカーリンクへ別ページから遷移してきた場合の動作
81	var urlHash = location.hash;
82	if (urlHash) {
83		$('body,html').stop().animate({
84			scrollTop: 0
85		});
86		setTimeout(function () {
87			var target = $(urlHash);
88			var position = target.offset().top - sclpos;
89			$('body,html').stop().animate({
90				scrollTop: position
91			}, {
92				duration: scldurat,
93				easing: 'easeOutExpo' //easing指定 -
94			});
95		}, 500); //ロード時の処理待ち(500ms ※適宜調整)後、時間差でスクロール -
96		history.replaceState('', document.title, window.location.pathname); //遷移後のURLから#を取り除く -
97	}
98	//#で始まるアンカーをクリックした場合の動作 ※not(~)は除外する要素)
99	$('a[href^="#"]:not(a[href="#dummy"], #pagetop a, a.carousel-control-prev, a.carousel-control-next, a.nav-link, a[data-toggle="collapse"], a[data-toggle="tab"], .stellarnav.mobile a.menu-toggle, .stellarnav.mobile a.close-menu, .stellarnav.mobile a.dd-toggle)').on('click', function () {
100		var href = $(this).attr("href");
101		var target = $(href == "#" || href == "" ? 'html' : href);
102		var position = target.offset().top - sclpos;
103		$('body,html').stop().animate({
104			scrollTop: position
105		}, {
106			duration: scldurat,
107			easing: 'easeOutExpo' //easing指定 -
108		});
109		return false;
110	});
111});
112
113
114//pagetopボタン
115$(function () {
116	var topBtn = $('#pagetop');
117	topBtn.hide();
118	$(window).scroll(function () {
119		if ($(this).scrollTop() > 640) { //ボタンが表示されるまでのスクロール量(単位px) -
120			topBtn.fadeIn();
121		} else {
122			topBtn.fadeOut();
123		}
124	});
125	topBtn.on('click', function () {
126		var scldurat = 1000; //スクロールの速度(単位ms) -
127		$('body,html').stop().animate({
128			scrollTop: 0
129		}, {
130			duration: scldurat,
131			easing: 'easeOutExpo' //easing指定 -
132		});
133		return false;
134	});
135	topBtn.on('click', function () { //押下時にメニュー(開いているドロップダウンメニューを含む)を全て閉じる -
136		$('.stellarnav.mobile .open > a.dd-toggle').click();
137		$('.stellarnav.mobile ul').hide();
138	});
139});
140
141
142//同一ドメイン用iframe height自動調整(行末に余白を付加する場合は.scrollHeight + [余白数値]と記述)
143$(window).on('load', function () {
144	$('.iframe-autoheight').on('load', function () {
145		try {
146			var height = $(this)[0].contentWindow.document.documentElement.scrollHeight;
147			$(this).css({
148				'width': '100%',
149				'height': height
150			});
151		} catch (event) {}
152	})
153	$('.iframe-autoheight').trigger('load');
154});
155
156
157//クロスドメイン用iframe height自動調整
158//$(function () {
159//	$(window).on('message', function (event) {
160//		//クロスサイトリクエストフォージェリ対策(送信元の検証) -
161//		if (event.originalEvent.origin !== 'http://外部サイト.com') return;
162//		var height = event.originalEvent.data;
163//		$('.iframe-autoheight').css({
164//			'width': '100%',
165//			'height': height
166//		});
167//	});
168//});
169
170
171//タッチデバイス(スマホ等)でのhoverエフェクト有効化
172window.ontouchstart = function () {};
173window.addEventListener('touchstart', function () {}, true);
174window.addEventListener('touchstart', function () {}, false);
175
176
177//タッチデバイス(スマホ等)でのhoverエフェクト無効化
178//var touch = 'ontouchstart' in document.documentElement ||
179//	navigator.maxTouchPoints > 0 ||
180//	navigator.msMaxTouchPoints > 0;
181//if (touch) {
182//	try {
183//		for (var si in document.styleSheets) {
184//			var styleSheet = document.styleSheets[si];
185//			if (!styleSheet.rules) continue;
186//			for (var ri = styleSheet.rules.length - 1; ri >= 0; ri--) {
187//				if (!styleSheet.rules[ri].selectorText) continue;
188//				if (styleSheet.rules[ri].selectorText.match(':hover')) {
189//					styleSheet.deleteRule(ri);
190//				}
191//			}
192//		}
193//	} catch (ex) {}
194//}
195
196
197//iOS Safariの「戻る」操作でキャッシュが表示される動作の対策(強制リロード)
198//window.onpageshow = function (event) {
199//	if (event.persisted) {
200//		window.location.reload();
201//	}
202//};

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.