PageSourceSearch

https://www.lion.co.jp/ja/assets/js/pagetop.js

js lion.co.jp collected 2026-10-01 10:19:41 UTC 1,129 bytes, 45 lines download raw bytes

1
2function PageTopAnime() {
3
4		var scroll = $(window).scrollTop(); 
5		if (scroll >= 200){
6			$('#page-top').removeClass('DownMove');
7			$('#page-top').addClass('UpMove');
8		}else{
9			if($('#page-top').hasClass('UpMove')){
10				$('#page-top').removeClass('UpMove');
11				$('#page-top').addClass('DownMove');
12			}
13		}
14		
15
16}
17
18$(window).scroll(function () {
19	PageTopAnime();
20});
21
22
23$(window).on('load', function () {
24	PageTopAnime();
25});
26
27
28$('#page-top').click(function () {
29    $('body,html').animate({
30        scrollTop: 0
31    }, 500, function () {
32        // h1 → main → #main → .main → bodyの順で最初に見つかった要素にフォーカス
33        var target = document.querySelector('h1') 
34                  || document.querySelector('main') 
35                  || document.querySelector('#main') 
36                  || document.querySelector('.main')
37                  || document.body;
38
39        if (!target.hasAttribute('tabindex')) {
40            target.setAttribute('tabindex', '-1');
41        }
42        target.focus({ preventScroll: true });
43    });
44    return false;
45});

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.