PageSourceSearch

http://gyakko.com/js/pagetotop.js?v=8

js gyakko.com collected 2026-10-04 21:08:12 UTC 1,250 bytes, 38 lines download raw bytes

1// スムーススクロール
2$(function(){
3   // #で始まるアンカーをクリックした場合に処理
4   $('a[href^=#]').click(function() {
5      // スクロールの速度
6      var speed = 400;// ミリ秒
7      // アンカーの値取得
8      var href= $(this).attr("href");
9      // 移動先を取得
10      var target = $(href == "#" || href == "" ? 'html' : href);
11      // 移動先を数値で取得
12      var position = target.offset().top-47;
13      // スムーススクロール
14      $('body,html').animate({scrollTop:position}, speed, 'swing');
15//      $($.browser.safari? 'body' : 'html').animate({scrollTop:position}, speed, 'swing');
16      return false;
17   });
18});
19
20
21// 任意の場所までスクロールするとコンテンツを表示する
22$(function(){
23   // スクロールすると表示するエリア
24   var element = $('#pagetop');
25   // スクロール量の設定
26   var position = 500; // 単位:px
27   // スクロールすると表示するエリアを非表示
28   element.hide();
29   $(window).scroll(function(){
30      // スクロールすると表示させる
31      if ($(this).scrollTop() > position) {
32         $(element).fadeIn();
33      } else {
34         $(element).fadeOut();
35      }
36   });
37});
38

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.