PageSourceSearch

https://ntvm.co.jp/wp-content/themes/ntvm/js/common.js?v=1790954149

js ntvm.co.jp collected 2026-10-02 15:16:12 UTC 3,647 bytes, 122 lines download raw bytes

1jQuery(function ($) {
2  var timer;
3
4  function header_ajust() {
5    header_h = $(".header").outerHeight();
6    $("html").attr("style", "--ajust:" + header_h + "px;");
7  }
8
9  function lazyload() {
10    $("*[data-src]").each(function () {
11      var scrollPos = $(this).scrollTop() + $(window).outerHeight();
12      var iframe = $(this);
13      var posi = $(this).offset();
14      posi_top = posi.top;
15      if (scrollPos > posi_top) {
16        // 表示位置を超えたら、srcに代入し呼び出す。
17        if ($(this).attr("src") === undefined) {
18          i = $(this).attr("data-src");
19          $(this).css({ opacity: 0 });
20          $(this).attr("src", i);
21          // 一度隠しておいて、画像を読み込んだらフェードイン!
22          $(this).load(function () {
23            $(this).css({ opacity: "" });
24          });
25        }
26      }
27    });
28  }
29
30  $(document).on("ready load", function () {
31    header_ajust();
32  });
33
34  $(window).on("scroll load resize", function () {
35    header_ajust();
36    lazyload();
37    var scrollPos = $(this).scrollTop();
38    window_h = $(window).outerHeight();
39    document_h = $("body").outerHeight();
40    header_h = $(".header").outerHeight();
41    $(".prllx").each(function (index) {
42      this_pos = $(this).offset().top;
43      trigger_pos = scrollPos + (window_h / 5) * 4;
44      if (trigger_pos > this_pos || scrollPos + window_h >= document_h) {
45        $(this).addClass("prllx_on");
46      }
47    });
48
49    var floating = $(".headerFloat .c-floating");
50    var floating_pos = 0;
51    if ($(".headerFloat").is(":visible")) {
52      floating_pos = floating.offset().top + floating.outerHeight();
53    }
54    var container = $(".container");
55    if (
56      //scrollPos <= floating_pos ||
57      scrollPos + window_h >
58      $(".footer").offset().top
59    ) {
60      container.addClass("-floatHide");
61    } else {
62      container.removeClass("-floatHide");
63    }
64
65    $(window).on("scroll", function () {
66      container.addClass("-nowScroll");
67      clearTimeout(timer);
68      timer = setTimeout(function () {
69        container.removeClass("-nowScroll");
70      }, 500);
71    });
72  });
73
74  $('*[href^="#"]:not([data-stt-changelang])').click(function () {
75    var adjust = 0;
76    var speed = 400;
77    var href = $(this).attr("href");
78    var target = $(href == "#" || href == "" ? "html" : href);
79    var position = target.offset().top - adjust;
80    $("body,html").animate({ scrollTop: position }, speed, "swing");
81    return false;
82  });
83  $(".header_menu, .gNavClose, .gNav_lang__item").on("click", function () {
84    $(this).closest(".container").toggleClass("gNavOpen");
85  });
86  $(".container")
87    .find(".toggle .toggle_head")
88    .on("click", function () {
89      var parent = $(this).parent(".toggle");
90      parent.toggleClass("open");
91      if (parent.hasClass("open")) {
92        $(this).nextAll().slideDown(250);
93      } else {
94        $(this).nextAll().slideUp(250);
95      }
96    });
97
98  $(".footerSnsList li a").click(function () {
99    sns_url = false;
100    if ($(this).hasClass("-fb")) {
101      sns_url =
102        "http://www.facebook.com/share.php?u=ssp.co.jp/allegrafxpremium/";
103    }
104    if ($(this).hasClass("-ln")) {
105      sns_url = "http://line.me/R/msg/text/?ssp.co.jp/allegrafxpremium/";
106    }
107    if ($(this).hasClass("-x")) {
108      sns_url = "https://x.com/share?url=ssp.co.jp/allegrafxpremium/";
109    }
110    if (sns_url !== false) {
111      window.open(sns_url, "_blank");
112    }
113  });
114
115  var form = $(".formrun-embed");
116  if (form.length) {
117    $("body").css({ opacity: 0 });
118    setTimeout(function () {
119      $("body").css({ opacity: "" });
120    }, 1000); // 1000ミリ秒 = 1秒
121  }
122});

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.