PageSourceSearch

https://www.city.morioka.iwate.jp/_template_/_site_/_default_/_res/js/pagetop_fade.js

js city.morioka.iwate.jp collected 2026-10-02 05:16:50 UTC 1,785 bytes, 84 lines download raw bytes

1//スクロール
2(function(){
3var $ = FI.jQuery;
4$(function() {
5	
6	var clickFlg = false;
7	
8	var topBtn = $('#guide .pagetop');	
9	topBtn.hide();
10
11	//スクロールが100に達したらボタン表示
12	$(window).scroll(function () {
13		if ($(this).scrollTop() > 100) {
14			topBtn.fadeIn();
15		} else {
16			topBtn.fadeOut();
17		}
18		if(clickFlg && $(this).scrollTop() == 0){
19			// フォーカスを先頭に移動
20			$('header').attr('tabindex', '0');
21			$('header').focus();
22			$('header').attr('tabindex', '-1');
23			clickFlg = false;
24		}
25	});
26
27	//スクロールしてトップ
28	topBtn.click(function () {
29		$('body,html').animate({
30			scrollTop: 0
31		}, 'slow','swing');
32		clickFlg = true;
33		return false;
34	});
35	
36	
37	
38	
39
40});
41
42})();
43
44
45//ページ内リンク
46(function(){
47var $ = FI.jQuery;
48$(function(){
49	$(".pagetop2 a").click(function(){
50		$('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing').focus();
51
52		$('h1').attr('tabindex', '0');
53		$('h1').focus();
54		$('h1').attr('tabindex', '-1');
55		
56		return false;
57	});
58});
59})();
60
61
62//ページ内リンク
63(function(){
64var $ = FI.jQuery;
65$(function(){
66	//緊急情報ボタンをクリックしたらスクロール
67	$(".topkinkyubnr p a").click(function(){
68		// ヘッダの高さ
69		var speed = 1000;
70		var href= $(this).attr("href");
71		var target = $(href == "#" || href == "" ? 'html' : href);
72		
73		// 移動先を数値で取得
74		var position = target.offset().top;
75		$("html, body").animate({scrollTop:position}, speed, "swing");
76		
77		// フォーカスを先頭に移動
78		$('#kinkyuinfo').attr('tabindex', '0');
79		$('#kinkyuinfo').focus();
80		$('#kinkyuinfo').attr('tabindex', '-1');
81		return false;
82	});
83});
84})();

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.