PageSourceSearch

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

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

1$(function(){
2
3  //ページトップ
4  $(window).scroll(function () {
5    var pagetop = $(".foot-pagetop");
6    var scrollHeight,scrollPosition,footHeight;
7    var bottom = 20;
8    if ($(this).scrollTop() > 300) {
9      pagetop.fadeIn();
10      // ドキュメントの高さ
11      scrollHeight = $(document).height();
12      // ウィンドウの高さ+スクロールした高さ→ 現在のトップからの位置
13      scrollPosition = $(window).height() + $(window).scrollTop();
14      // フッターの高さ
15      footHeight = $(".foot-main").outerHeight();
16       
17      // スクロール位置がフッターまで来たら
18      if ( scrollHeight - scrollPosition  <= footHeight ) {
19        pagetop.css({"position":"absolute","bottom": footHeight + bottom});
20      } else {
21        pagetop.css({"position":"fixed","bottom": bottom +"px"});
22      }
23    } else {
24      pagetop.fadeOut();
25    }
26  });
27
28  //スマホメニュー作成
29  var $head = $( 'header' );
30  $('<p class="head-menu"><span class="top"></span><span class="middle"></span><span class="bottom"></span></p>').appendTo($head);
31  $('<div class="head-hidden"></div>').appendTo($head);
32  var spMenu = $(".head-hidden");
33  $head.find("nav").clone(true).appendTo(spMenu);
34  var $btn = $('.head-menu');
35  $btn.click(function(){
36    $head.toggleClass('active');
37  });
38  spMenu.find(".btn").addClass('lg');
39  $head.find(".toggle").click(function(){
40    $(this).toggleClass("active");
41  });
42  // パララックス
43  $(window).on('scroll load', function () {
44    parallaxScroll();
45  });
46  function parallaxScroll() {
47    var scrolled = $(window).scrollTop();
48    $('.parallax').each(function(){
49      speed = $(this).data("speed");
50      if(!speed){
51        speed = 1.5;
52      }
53      $(this).css({
54        'transform': 'translateY('+((scrolled - $(this).offset().top) * (speed / 10)) +'px)'
55      });
56    });
57  }
58});

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.