PageSourceSearch

https://kawamata.clinic/js/jQ.js

js kawamata.clinic collected 2026-10-06 08:10:21 UTC 5,776 bytes, 198 lines download raw bytes

1// JavaScript Document
2
3
4jQuery(document).ready( function() {
5
6
7// SPドロップダウンメニュー SlickNav
8  $('#nav').slicknav({
9    label: '',
10    closeOnClick: 'true'
11  });
12
13
14// 電話番号
15  if (navigator.userAgent.match(/(iPhone|iPad|Android|Mobile)/)) {
16    $('.tel').each(function() {
17      var str = $(this).html();
18      if ($(this).children().is('img')) {
19        $(this).html($('<a>').attr('href', 'tel:' + $(this).children().attr('alt').replace(/-/g, '')).append(str + '</a>'));
20      } else {
21        $(this).html($('<a>').attr('href', 'tel:' + $(this).text().replace(/-/g, '')).append(str + '</a>'));
22      }
23    });
24  }
25
26// 電話番号 アプリ仕様
27//  if (getParam ('app') != 1 && navigator.userAgent.match(/(iPhone|Android|Mobile)/)) {
28//    $('.tel').each(function() {
29//      var str = $(this).html();
30//      if ($(this).children().is('img')) {
31//        $(this).html($('<a>').attr('href', 'tel:' + $(this).children().attr('alt').replace(/-/g, '')).append(str + '</a>'));
32//      } else {
33//        $(this).html($('<a>').attr('href', 'tel:' + $(this).text().replace(/-/g, '')).append(str + '</a>'));
34//      }
35//    });
36//  }
37
38
39// トップ キービジュアル背景
40
41    $('#keyvsl').bgswitcher({
42    images: [
43      "img/index_keyvsl01.jpg",
44      "img/index_keyvsl02.jpg",
45      "img/index_keyvsl03.jpg"
46    ],
47    interval: 5000,
48    effect: "fade"
49  });
50
51  $('#keyvsl').delay(50).css('visibility','visible');
52    $('#keyvsl_sp').bgswitcher({
53    images: [
54      "img/index_keyvsl01_sp.jpg",
55      "img/index_keyvsl02.jpg",
56      "img/index_keyvsl03.jpg"
57    ],
58    interval: 5000,
59    effect: "fade"
60  });
61
62  $('#keyvsl_sp').delay(50).css('visibility','visible');
63
64// トップ キービジュアル
65  /*$('#keyvsl').bxSlider({
66    auto: true,
67    pause: 5000,
68    speed: 1000,
69    mode: 'fade',
70    controls: false,
71    pager: false
72  });
73  $('#keyvsl img').delay(50).css('visibility','visible');*/
74
75
76// トップ お知らせ アコーディオン
77  $('.index .news_body').hide();
78  $('.index .news_title').wrapInner('<a href="javascript:void(0);">');
79  $('.index .news_title').click(function(){
80    $(this).toggleClass("open").next('.index .news_body').slideToggle();
81  });
82  $('.index .news_title:nth-of-type(-n+3)').toggleClass("open").next('.index .news_body').slideToggle();
83
84
85// クリニック紹介ギャラリー
86  $('#clinicslide, #clinicslide2, #clinicslide3, #clinicslide4, #clinicslide5').sliderPro({
87    width: 750,
88    height: 500,
89    fade: true,
90    arrows: true,
91    buttons: false,
92    fullScreen: false,
93    shuffle: false,
94    thumbnailArrows: true,
95    autoplay: false
96  });
97  $('#clinicslide img, #clinicslide p, #clinicslide2 img, #clinicslide2 p, #clinicslide3 img, #clinicslide3 p, #clinicslide4 img, #clinicslide4 p, #clinicslide5 img, #clinicslide5 p').delay(50).css('display','block');
98
99
100// PC 診療内容ドロップダウンメニュー
101  var windowWidth = $(window).width();
102  var windowSm = 768;
103  if (windowWidth >= windowSm) { // PCの場合
104    $('#nav .subnav').hide();
105    $('#nav .sub').click( function(event) {
106      $(this).toggleClass('open').next('#nav .subnav').css('visibility','visible').slideToggle();
107      $('#nav .sub').not($(this)).removeClass('open').next('#nav .subnav').css('display','none');
108    });
109  }
110
111// SP 診療内容ドロップダウンメニュー
112//  if (windowWidth <= windowSm) { // スマホの場合
113//    $( '.tit' ).click( function() {
114//      $( this ).toggleClass('open').next('.subnav').slideToggle();
115//    }) ;
116//  }
117
118
119// スムーズスクロール
120  $('.scr').click(function(){
121    var speed = 500;
122    var href= $(this).attr("href");
123    var target = $(href == "#" || href == "" ? 'html' : href);
124    var position = target.offset().top;
125    $("html, body").animate({scrollTop:position}, speed, "swing");
126    return false;
127  });
128
129});
130
131
132// ページアップ単体
133var up = $("#pageup");
134$(window).scroll(function () {
135  if ($(this).scrollTop() > 200) {
136    up.fadeIn();
137  } else {
138    up.fadeOut();
139  }
140});
141up.click(function () {
142  $("body, html").animate({ scrollTop: 0 }, 500);
143  return false;
144});
145
146// SPフッター固定 電話・ページアップ
147var f_fix = $(".tel_up").hide();
148$(window).scroll(function () {
149  if ($(this).scrollTop() > 200) {
150    f_fix.fadeIn().css('visibility', 'visible');
151  } else {
152    f_fix.fadeOut();
153  }
154});
155$('.pageup').click(function () {
156  $("body, html").animate({ scrollTop: 0 }, 500);
157  return false;
158});
159
160
161// アプリの場合 電話凍結(クリコネ仕様)
162
163//function getParam(name) {
164//  var url = location.href;
165//  parameters = url.split("?");
166//  if (parameters.length <=1) return "";
167//  params = parameters[1].split("&");
168//  var paramsArray = [];
169//  for ( i = 0; i < params.length; i++ ) {
170//    neet = params[i].split("=");
171//    paramsArray.push(neet[0]);
172//    paramsArray[neet[0]] = neet[1];
173//  }
174//  var categoryKey = paramsArray[name];
175//  if (categoryKey == undefined) categoryKey = "";
176//  return categoryKey;
177//}
178
179// アコーディオン クラス付与
180const FOCUS_ELEMENT = 'a, input, button';
181const ACCORDION_DEFAULT_CLOSE = $('.toggle_acco_target:not(.default-open)');
182ACCORDION_DEFAULT_CLOSE.find(FOCUS_ELEMENT).attr('tabindex', '-1');
183ACCORDION_DEFAULT_CLOSE.addClass('is_close');
184ACCORDION_DEFAULT_CLOSE.slideToggle();
185
186$(".toggle_acco_trigger").click(function(e){
187e.preventDefault();
188let toggle_target = "#" + $(this).attr("data-toggle_acco_target");
189console.log(toggle_target);
190if($(toggle_target).hasClass('is_close')) {
191  $(toggle_target).find(FOCUS_ELEMENT).attr('tabindex', '-1');
192} else {
193  $(toggle_target).find(FOCUS_ELEMENT).attr('tabindex', '0');
194}
195$(toggle_target).slideToggle();
196$(toggle_target).toggleClass("is_close");
197$(this).toggleClass("is_open");
198});

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.