PageSourceSearch

https://ohira-dental.info/assets/js/style.js

js ohira-dental.info collected 2026-10-06 08:18:38 UTC 4,929 bytes, 192 lines download raw bytes

1$(function () {
2	$('a[href^="#"]').click(function () {
3		var speed = 500;
4		var href = $(this).attr("href");
5		var target = $(href == "#" || href == "" ? 'html' : href);
6		var position = target.offset().top;
7		$("html, body").animate({
8			scrollTop: position
9		}, speed, "swing");
10		return false;
11	});
12});
13
14/*/-----------------オープニング*/
15// $(function(){
16// 	var $window = $(window);
17//
18// 	if (sessionStorage.getItem('skip')) {
19// 		$('.opening-container').css({ 'display' : 'none'});
20// 	}
21// 	else {
22// 		$('.openingContents').animate({opacity : 1});
23// 	//自動で消す場合はonclickを外して.delay()で消えるまでの秒数を指定
24// 		$('.skip img').on('click', function(e) {
25// 			$('.opening-container').fadeOut(400);
26// 		});
27// 		if (window.sessionStorage) {
28// 			sessionStorage.setItem('skip', 'Value');
29// 		}
30// 	}
31// });
32
33$(function(){
34	$(".ac_menu").on("click", function () {
35		$(this).next().slideToggle();
36		$(this).toggleClass("active");
37		return false;
38	});
39});
40
41$(function(){
42		$(".has-child > a").on("click", function () {
43			var ww = window.innerWidth;
44			if (ww < 767) {
45			$(this).next().slideToggle();
46			$(this).parent().toggleClass("pullOpen");
47			return false;
48		}
49		});
50});
51
52// ウィンドウリサイズ処理
53$(function () {
54  var lastInnerWidth = window.innerWidth;
55  $(window).on('load resize', function () {
56    var ww = window.innerWidth,
57      header_breakPoint = 959;
58    if (lastInnerWidth != window.innerWidth) {
59      lastInnerWidth = window.innerWidth;
60      if (ww > header_breakPoint) {
61        $('.navi').show();
62      } else {
63        $('.navi').hide();
64      }
65
66    }
67  });
68});
69
70// フェードイン
71$(function(){
72    $(window).scroll(function (){
73        $('.scrollIn').each(function(){
74            var elemPos = $(this).offset().top;
75            var scroll = $(window).scrollTop();
76            var windowHeight = $(window).height();
77            if (scroll > elemPos - windowHeight + 200){
78                $(this).addClass('active');
79            }
80        });
81    });
82});
83
84$(function() {
85    var showFlag = false;
86    var topBtn = $('#toTop');
87    topBtn.css('bottom', '-100px');
88    var showFlag = false;
89    //スクロールが100に達したらボタン表示
90    $(window).scroll(function () {
91        if ($(this).scrollTop() > 100) {
92            if (showFlag == false) {
93                showFlag = true;
94                topBtn.stop().animate({'bottom' : '20px'}, 200);
95            }
96        } else {
97            if (showFlag) {
98                showFlag = false;
99                topBtn.stop().animate({'bottom' : '-100px'}, 200);
100            }
101        }
102    });
103    //スクロールしてトップ
104    topBtn.click(function () {
105        $('body,html').animate({
106            scrollTop: 0
107        }, 500);
108        return false;
109    });
110});
111
112
113//
114// // アコーディオン
115// $(function () {
116// 	var ww = window.innerWidth;
117// 		$(".pullDown > p:first-child").on("click", function () {
118// 				$(this).next().slideToggle(600, 'swing');
119// 				$(this).toggleClass('active')
120// 				return false;
121// 			});
122// 			if (ww < 767) {
123// 				$(".sp_pull > p").on("click", function () {
124// 						$(this).next().slideToggle(600, 'swing');
125// 						$(this).toggleClass('active')
126// 						return false;
127// 					});
128// 		  } else {
129// 		  }
130// });
131//
132// $(function(){
133//   $('.thumb li').click(function(){
134//     var class_name = $(this).attr("class");
135//     var num = class_name.slice(5);
136//     $('.main li').hide();
137//     $('.item' + num).fadeIn();
138//   });
139// });
140//
141//
142// //タブ
143// $(function () {
144//   /*初期表示*/
145//   $('.tabContent').hide();
146//   $('.tabContent').eq(0).show();
147//   $('.tabButton > li').eq(0).addClass('active');
148//   /*クリックイベント*/
149//   $('.tabButton > li').each(function () {
150//     $(this).on('click', function () {
151//       var index = $('.tabButton > li').index(this);
152//       $('.tabButton > li').removeClass('active');
153//       $(this).addClass('active');
154//       $('.tabContent').hide();
155//       $('.tabContent').eq(index).show();
156//     });
157//   });
158// });
159
160
161
162// <?php if(is_front_page()) : ?>
163// <script type="text/javascript">
164// jQuery(function() {
165// $(".scroll").click(function(event){
166// event.preventDefault();
167// var url = $(this).attr("href");
168//
169// var dest = url.split("#");
170// var target = dest[1];
171// var target_offset = $("#"+target).offset();
172// var target_top = target_offset.top;
173//
174// $('body,html').animate({scrollTop:target_top}, 800, 'swing');
175// return false;
176// });
177// });
178// </script>
179// <?php else : ?>
180// <script type="text/javascript">
181// jQuery(function() {
182// $('a[href^=#]').click(function() {
183// var speed = 800;
184// var href= $(this).attr("href");
185// var target = $(href == "#" || href == "" ? 'html' : href);
186// var position = target.offset().top;
187// $('body,html').animate({scrollTop:position}, speed, 'swing');
188// return false;
189// });
190// });
191// </script>
192// <?php endif; ?>

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.