PageSourceSearch

https://fukubekaji.jp/wp/wp-content/themes/wp-fukube2022/js/btob/jquery.base.js

js fukubekaji.jp collected 2026-10-04 21:51:47 UTC 4,392 bytes, 178 lines download raw bytes

1jQuery(document).ready(function() {
2  jQuery('.hamburger_area').on('click', function() {
3    jQuery('.g_nav').toggleClass('active');
4    jQuery(this).toggleClass('active');
5  });
6});
7jQuery(document).ready(function() {
8  jQuery('.g_nav li a').on('click', function() {
9    jQuery('.g_nav').toggleClass('active');
10    jQuery(this).toggleClass('active');
11    jQuery('.hamburger_area').toggleClass('active');
12  });
13});
14
15
16
17// アニメーション
18$(function() {
19  $('.fade_in').on('inview', function(event, isInView, visiblePartX, visiblePartY) {
20    if (isInView) {
21      $(this).stop().addClass('fadeIn');
22    } else {
23      $(this).stop().removeClass('');
24    }
25  });
26  $('.fade_in_up').on('inview', function(event, isInView, visiblePartX, visiblePartY) {
27    if (isInView) {
28      $(this).stop().addClass('fadeInUp');
29    } else {
30      $(this).stop().removeClass('');
31    }
32  });
33
34});
35
36
37
38
39// アコーディオン
40$(function() {
41  $(".acMenu dt").on("click", function() {
42    $(this).next().slideToggle();
43    $(this).toggleClass("ac_active");
44  });
45});
46
47// 画像切り替え
48$(function() {
49  var $elem = $('.switch');
50  var sp = '_sp.';
51  var pc = '_pc.';
52  var replaceWidth = 768;
53
54  function imageSwitch() {
55    var windowWidth = parseInt($(window).width());
56    $elem.each(function() {
57      var $this = $(this);
58      if (windowWidth >= replaceWidth) {
59        $this.attr('src', $this.attr('src').replace(sp, pc));
60      } else {
61        $this.attr('src', $this.attr('src').replace(pc, sp));
62      }
63    });
64  }
65  imageSwitch();
66
67  var resizeTimer;
68  $(window).on('resize', function() {
69    clearTimeout(resizeTimer);
70    resizeTimer = setTimeout(function() {
71      imageSwitch();
72    }, 200);
73  });
74});
75
76
77
78
79
80/*--------------------------------------------------------------------------*
81 *
82 *  SmoothScroll JavaScript Library V2
83 *
84 *  MIT-style license.
85 *
86 *  2007-2011 Kazuma Nishihata
87 *  http://www.to-r.net
88 *
89 *--------------------------------------------------------------------------*/
90
91new function() {
92
93  var attr = "data-tor-smoothScroll"; //for html5 , if you can't use html5 , this value change "class"
94  var attrPatt = /noSmooth/;
95  var d = document; //document short cut
96
97  /*
98   *add Event
99    -------------------------------------------------*/
100  function addEvent(elm, listener, fn) {
101    try { // IE
102      elm.addEventListener(listener, fn, false);
103    } catch (e) {
104      elm.attachEvent(
105        "on" + listener,
106        function() {
107          fn.apply(elm, arguments)
108        }
109      );
110    }
111  }
112
113  /*
114   *Start SmoothScroll
115    -------------------------------------------------*/
116  function SmoothScroll(a) {
117    if (d.getElementById(a.rel.replace(/.*\#/, ""))) {
118      var e = d.getElementById(a.rel.replace(/.*\#/, ""));
119    } else {
120      return;
121    }
122
123    //Move point
124    var end = e.offsetTop
125    var docHeight = d.documentElement.scrollHeight;
126    var winHeight = window.innerHeight || d.documentElement.clientHeight
127    if (docHeight - winHeight < end) {
128      var end = docHeight - winHeight;
129    }
130
131    //Current Point
132    var start = window.pageYOffset || d.documentElement.scrollTop || d.body.scrollTop || 0;
133
134
135    end += 0;
136    var flag = (end < start) ? "up" : "down";
137
138    function scrollMe(start, end, flag) {
139      setTimeout(
140        function() {
141          if (flag == "up" && start >= end) {
142            start = start - (start - end) / 20 - 1;
143            window.scrollTo(0, start)
144            scrollMe(start, end, flag);
145          } else if (flag == "down" && start <= end) {
146            start = start + (end - start) / 20 + 1;
147            window.scrollTo(0, start)
148            scrollMe(start, end, flag);
149          } else {
150            scrollTo(0, end);
151          }
152          return;
153        }, 10
154      );
155
156    }
157
158    scrollMe(start, end, flag);
159
160  }
161
162  /*
163   *Add SmoothScroll
164    -------------------------------------------------*/
165  addEvent(window, "load", function() {
166    var anchors = d.getElementsByTagName("a");
167    for (var i = 0, len = anchors.length; i < len; i++) {
168      if (!attrPatt.test(anchors[i].getAttribute(attr)) &&
169        anchors[i].href.replace(/\#[a-zA-Z0-9_]+/, "") == location.href.replace(/\#[a-zA-Z0-9_]+/, "")) {
170        anchors[i].rel = anchors[i].href;
171        anchors[i].href = "javascript:void(0)";
172        anchors[i].onclick = function() {
173          SmoothScroll(this)
174        }
175      }
176    }
177  });
178}

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.