PageSourceSearch

https://i-shift.com/wp-content/themes/OriginalTheme/asset/js/pagetop.js

js i-shift.com collected 2026-10-09 22:40:38 UTC 1,370 bytes, 44 lines download raw bytes

1jQuery(document).ready(function ($) {
2  var topBtn = $('#pageTop-fixed');
3
4  // 表示/非表示(元のまま)
5  $(window).on('scroll', function () {
6    var obj_t_pos = $('#menu-event').offset().top;
7    var scr_count = $(document).scrollTop() + (window.innerHeight / 9);
8    var obj_t_pos_footer = $('footer').offset().top;
9    var scr_count_footer = $(document).scrollTop() + (window.innerHeight / 1);
10
11    if (scr_count > obj_t_pos && scr_count_footer < obj_t_pos_footer) {
12      topBtn.addClass('fadein').removeClass('fadeout');
13    } else {
14      topBtn.removeClass('fadein').addClass('fadeout');
15    }
16  });
17
18  // PageTop(2つとも効かせる:fixed/ footer)
19  $('.pageTop-wrap a[href="#"]').on('click', function (e) {
20    e.preventDefault();
21    e.stopPropagation();
22    $('html, body').stop(true).animate({ scrollTop: 0 }, 1000, 'swing');
23    return false;
24  });
25
26  // ページ内リンクのスムーズスクロール(PageTopは除外)
27  $('a[href^="#"]').not('.pageTop-wrap a').on('click', function (e) {
28    var href = $(this).attr('href');
29
30    // "#" 単体は何もしない(保険)
31    if (!href || href === '#') return;
32
33    var $target = $(href);
34    if (!$target.length) return;
35
36    e.preventDefault();
37
38    $('html, body').stop(true).animate(
39      { scrollTop: $target.offset().top },
40      700,
41      'swing'
42    );
43  });
44});

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.