PageSourceSearch

https://fps-inc.jp/assets/js/common.js

js fps-inc.jp collected 2026-10-04 12:37:32 UTC 1,691 bytes, 67 lines download raw bytes

1$(function(){
2
3  // ページ内リンクのスムーススクロール
4  $('a[href^="#"]').click(function() {
5    var speed = 400;
6    var href = $(this).attr("href");
7    var target = $(href == "#" || href == "" ? 'html' : href);
8    var position = target.offset().top;
9
10    if (target.hasClass("news") || target.closest(".news").length) {
11      position -= 70;
12    }
13
14    $('html, body').animate({scrollTop:position}, speed, 'swing');
15    return false;
16  });
17
18
19  // スマホ用
20  if (window.matchMedia("(max-width: 767px)").matches) {
21
22    $('#header-spBtn, #header-spNavi-btn').click(function() {
23      $('#header-spNavi').toggleClass('active');
24    });
25
26    $('.sl-link-btn').click(function() {
27      $(this).toggleClass('open');
28      $(this).parents(".sl-link").next(".sl-nav").slideToggle();
29    });
30  }
31
32
33  // PC用グロナビ(スライドダウン対応)
34  $('.hovNav').each(function() {
35
36    var className = $(this).attr('class').split(' ')[1];
37
38    $(this).hover(
39      function () {
40        // 下へスライドして表示
41        $('.' + className + 'Nav').stop(true, true).slideDown(400);
42      },
43      function () {
44        // ホバーを外れたらスライドアップして非表示
45        if (
46          !$('.' + className).is(":hover") &&
47          !$('.' + className + 'Nav').is(":hover")
48        ) {
49          $('.' + className + 'Nav').stop(true, true).slideUp(200);
50        }
51      }
52    );
53  });
54
55  // PC: サブメニューから離れた時
56  $('.svNav, .csNav, .fpNav').hover(
57    function () {
58      // 何もしない
59    },
60    function () {
61      if (!$(this).is(":hover")) {
62        $(this).stop(true, true).slideUp(200);
63      }
64    }
65  );
66
67});

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.