PageSourceSearch

https://www.elife.co.jp/wp-content/themes/elife/js/jquery.smoothScroll.js?ver=5.8.17

js elife.co.jp collected 2026-10-04 13:25:11 UTC 1,068 bytes, 31 lines download raw bytes

1$(function(){
2   // #で始まるアンカーをクリックした場合に処理
3   $(document).on( "click", 'a[href^=#]', function() {
4    var headerH = $('header').outerHeight();
5    var position;
6    if(!$(this).hasClass('noSmooth')){
7      // スクロールの速度
8      var speed = 1000; // ミリ秒
9      // アンカーの値取得
10      var href= $(this).attr("href");
11      // 移動先を取得
12      var target = $(href === "#" || href === "" ? 'html' : href);
13      // 移動先を数値で取得 
14      position = target.offset().top;
15      // スムーススクロール
16      $('body,html').animate({scrollTop:position}, speed, 'easeOutCubic');
17      return false;
18    }
19   });
20});
21$(window).on('load', function() {
22  var url = $(location).attr('href');
23  if(url.indexOf("?id=") !== -1){
24    var id = url.split("?id=");
25    var $target = $('#' + id[id.length - 1]);
26    if($target.length){
27      var pos = $target.offset().top - $('header .head-fixed').outerHeight();
28      $("html, body").animate({scrollTop:pos}, 0, 'easeOutCubic');
29    }
30  }
31});

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.