PageSourceSearch

https://ohsugi-kanpo.co.jp/wp-content/themes/rush-design-plane/library/js/script.js?ver=1791371608

js ohsugi-kanpo.co.jp collected 2026-10-07 11:13:38 UTC 3,434 bytes, 128 lines download raw bytes

1// スマホヘッダー
2  $(function() {
3    var h_nav_sp = $('#h_nav_sp');
4    var modal = $('#drawerModal');
5    var drawerBtn = $('#h_toggle_btn');
6    drawerBtn.on('click', function() {
7      if ($(this).hasClass('openMenu')) {
8        $(this).removeClass('openMenu');
9        h_nav_sp.removeClass('on');
10        modal.removeClass('on');
11      } else {
12        $(this).addClass('openMenu');
13        h_nav_sp.addClass('on');
14        modal.addClass('on');
15      }
16    });
17    modal.on("click", function() {
18      $(this).removeClass("on");
19      h_nav_sp.removeClass("on");
20      drawerBtn.removeClass('openMenu');
21    });
22  });
23  $(function(){
24    $('#h_nav_sp span').on('click', function() {
25      $(this).next().slideToggle();
26      if($(this).hasClass('active')){
27        $(this).removeClass('active');
28      }else{
29        $(this).addClass('active');
30      }
31    });
32  });
33  $(function() {
34    var $win = $(window),
35        $cloneNav = $('#h_cover').clone('true').addClass('clone-header').appendTo('#header'),
36        showClass = 'is-show';
37    $win.on('load scroll', function() {
38      var value = $(this).scrollTop();
39      if ( value > 200 ) {
40        $cloneNav.addClass(showClass);
41      } else {
42        $cloneNav.removeClass(showClass);
43      }
44    });
45  });
46
47
48// PCサブメニュー
49$(function(){
50  $('#h_nav').superfish({
51    delay: 800,
52    animation: {height: 'show'},
53    animationOut: {height: 'hide'},
54    cssArrows: true
55  });
56});
57
58// サイドメニュー
59$(function(){
60  $('.side_box li span').on('click', function() {
61    $(this).next().slideToggle();
62    if($(this).hasClass('active')){
63      $(this).removeClass('active');
64    }else{
65      $(this).addClass('active');
66    }
67  });
68});
69
70// フッター固定
71new function(){
72	var footerId = "footer";
73	function footerFixed(){
74		var dh = document.getElementsByTagName("body")[0].clientHeight;
75		document.getElementById(footerId).style.top = "0px";
76		var ft = document.getElementById(footerId).offsetTop;
77		var fh = document.getElementById(footerId).offsetHeight;
78		if (window.innerHeight){
79			var wh = window.innerHeight;
80		}else if(document.documentElement && document.documentElement.clientHeight != 0){
81			var wh = document.documentElement.clientHeight;
82		}
83		if(ft+fh<wh){
84			document.getElementById(footerId).style.position = "relative";
85			document.getElementById(footerId).style.top = (wh-fh-ft)+"px";
86		}
87	}
88	function checkFontSize(func){
89		var e = document.createElement("div");
90		var s = document.createTextNode("S");
91		e.appendChild(s);
92		e.style.visibility="hidden"
93		e.style.position="absolute"
94		e.style.top="0"
95		document.body.appendChild(e);
96		var defHeight = e.offsetHeight;
97		function checkBoxSize(){
98			if(defHeight != e.offsetHeight){
99				func();
100				defHeight= e.offsetHeight;
101			}
102		}
103		setInterval(checkBoxSize,1000)
104	}
105	function addEvent(elm,listener,fn){
106		try{
107			elm.addEventListener(listener,fn,false);
108		}catch(e){
109			elm.attachEvent("on"+listener,fn);
110		}
111	}
112	addEvent(window,"load",footerFixed);
113	addEvent(window,"load",function(){
114		checkFontSize(footerFixed);
115	});
116	addEvent(window,"resize",footerFixed);
117}
118
119$(function(){
120   $('a[href^=#]').click(function() {
121      var speed = 400;
122      var href= $(this).attr("href");
123      var target = $(href == "#" || href == "" ? 'html' : href);
124      var position = target.offset().top;
125      $('body,html').animate({scrollTop:position}, speed, 'swing');
126      return false;
127   });
128});

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.