PageSourceSearch

https://aoba-e.info/to-top.js

js aoba-e.info collected 2026-10-06 18:15:21 UTC 949 bytes, 26 lines download raw bytes

1$(function(){
2	//ボタン[id:page-top]を出現させるスクロールイベント
3	$(window).scroll(function(){
4		//最上部から現在位置までの距離を取得して、変数[now]に格納
5		var now = $(window).scrollTop();
6
7		//最下部から現在位置までの距離を計算して、変数[under]に格納
8		var under = $('body').height() - (now + $(window).height());
9 
10		//最上部から現在位置までの距離(now)が100以上かつ
11		//最下部から現在位置までの距離(under)が0px以上だったら
12		if(now > 100){
13			//[#page-top]をゆっくりフェードインする
14			$('#page-top').fadeIn('slow');
15		//それ以外だったらフェードアウトする
16		}else{
17			$('#page-top').fadeOut('slow');
18		}
19	});
20 
21	//ボタン(id:move-page-top)のクリックイベント
22	$('#move-page-top').click(function(){
23		//ページトップへ移動する
24		$('html,body').animate({scrollTop:0},'slow');
25	});
26});

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.