PageSourceSearch

https://midoridental.jp/local/wp-content/themes/MMD/js/script.js?ver=1.0.0

js midoridental.jp collected 2026-10-05 09:43:46 UTC 3,076 bytes, 103 lines download raw bytes

1$(function () {
2  //     //マウスを乗せたら発動
3  //     $('.menu-link li a').hover(function() {
4
5  //         $('.menu_des_wrap').css('opacity', '1');
6
7  //         //ここにはマウスを離したときの動作を記述
8  //     }, function() {
9
10  //         $('.menu_des_wrap').css('opacity', '0');
11
12  //     });
13
14  // 一番目のコンテンツ以外非表示
15  $(".menu-description .menu_des_wrap:not(:first-of-type)").css(
16    "display",
17    "none"
18  );
19
20  // タブの制御
21  $(".menu-link a").hover(function () {
22    // タブメニューをhoverしたら
23    var index = $(".menu-link a").index(this); // hoverしたタブ番号を取得
24    $(".menu-link a").removeClass("current"); // タブ現在地クラスを削除し、
25    $(this).addClass("current"); // hoverしたタブにタブ現在地クラスを付与
26
27    //////////// コンテンツの制御
28    $(".menu_des_wrap").hide().eq(index).show(); // hoverしてないコンテンツは非表示、hoverした番号は表示
29  });
30});
31
32$(window).on("load", function () {
33  var url = $(location).attr("href");
34  if (url.indexOf("#") != -1) {
35    var anchor = url.split("#");
36    var target = $("#" + anchor[anchor.length - 1]);
37    if (target.length) {
38      var pos = Math.floor(target.offset().top) - 120;
39      $("html, body").animate({ scrollTop: pos }, 500);
40    }
41  }
42});
43
44//トップMVスライダー
45const swiper = new Swiper(".swiper", {
46  // Optional parameters
47  loop: true,
48  effect: "fade",
49  autoplay: {
50    // 自動再生
51    delay: 3000, // 1.5秒後に次のスライド
52  },
53  speed: 1000,
54});
55
56// 対象記事のみ、ボタンの遷移先変更
57document.addEventListener("DOMContentLoaded", function () {
58  if (
59    window.location.href.includes(
60      "https://midoridental.jp/news-detail-web-reservation"
61    )
62  ) {
63    function updateButton() {
64      var targetElement = document.querySelector(".uk-text-center.mt40");
65      if (targetElement) {
66        targetElement.innerHTML =
67          '<a href="https://tayori.com/form/e1ddaa2c866aacb87c911df7c3673f36b764fe58" target="_blank" class="uk-button">初診専用WEB予約はこちら&nbsp;&nbsp;<i class="fas fa-chevron-right"></i></a>';
68        return true;
69      }
70      return false;
71    }
72
73    if (!updateButton()) {
74      const observer = new MutationObserver(() => {
75        if (updateButton()) {
76          observer.disconnect();
77        }
78      });
79
80      observer.observe(document.body, { childList: true, subtree: true });
81    }
82  }
83});
84
85// ページナビレイアウト調整
86document.addEventListener("DOMContentLoaded", function () {
87  function adjustPageNaviAlignment() {
88    const pager = document.querySelector(".pager");
89    const pageNavi = document.querySelector(".pager .page_navi");
90
91    if (pager && pageNavi) {
92      if (pageNavi.scrollWidth > pager.clientWidth) {
93        pageNavi.style.justifyContent = "flex-start";
94      } else {
95        pageNavi.style.justifyContent = "";
96      }
97    }
98  }
99
100  adjustPageNaviAlignment();
101
102  window.addEventListener("resize", adjustPageNaviAlignment);
103});

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.