PageSourceSearch

https://school.tosemi.jp/js/tosemi/smoothscroll.js

js tosemi.jp collected 2026-10-05 20:33:56 UTC 594 bytes, 17 lines download raw bytes

1//スムーズスクロール
2jQuery(function(){
3   // #で始まるアンカーをクリックした場合に処理
4   jQuery('a[href^="#"]').click(function() {
5	  // スクロールの速度
6	  var speed = 400; // ミリ秒
7	  // アンカーの値取得
8	  var href= jQuery(this).attr("href");
9	  // 移動先を取得
10	  var target = jQuery(href == "#" || href == "" ? 'html' : href);
11	  // 移動先を数値で取得
12	  var position = target.offset().top;
13	  // スムーススクロール
14	  jQuery('body,html').animate({scrollTop:position}, speed, 'swing');
15	  return false;
16   });
17});

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.