PageSourceSearch

https://www.capony-wakanyaku.co.jp/cms/wp-content/themes/2020/js/library.js?v=20260903

js capony-wakanyaku.co.jp collected 2026-09-30 22:35:53 UTC 7,526 bytes, 276 lines download raw bytes

1$(function(){
2  var state = false;
3  $('.drop-trigger').on('mouseover', function() {
4    if(state == false) {
5      $(this).next('.dropmenu-bg').addClass('show');
6      state = true;
7    } else {
8      $('.dropmenu-bg').removeClass('show');
9      $(this).next('.dropmenu-bg').addClass('show');
10      state = true;
11    }
12  });
13  $('.dropout').on('mouseover', function() {
14    if(state == true) {
15      $('.dropmenu-bg').removeClass('show');
16      state = false;
17    }
18  });
19  $('.header').on('mouseleave', function() {
20    $('.dropmenu-bg').removeClass('show');
21    state = false;
22  });
23});
24
25$(function(){
26  $(".aco-btn").click(function(){
27    $(this).toggleClass("active");
28    $(this).prev(".aco-content").slideToggle("fast");
29  });
30});
31$(function(){
32  $(".faq dt").click(function(){
33    $(this).toggleClass("active");
34    $(this).next("dd").slideToggle("fast");
35    $(".faq dt").not($(this)).next().slideUp();
36    $(".faq dt").not($(this)).removeClass('active');
37  });
38});
39
40$(function() {
41  if (window.matchMedia("(min-width: 768px)").matches) {
42    var fixedItem = $('header.index');
43    var h = $(fixedItem).outerHeight();
44    $(window).on('load scroll', function () {
45      var winTop = $(this).scrollTop();
46      if (winTop <= h) {
47         $(fixedItem).removeClass('fixed default');
48         $('.page-top .header-dmy').css({display: 'none'});
49         $('.page-top .slidenav').css({top: '156px'});
50      } else if (winTop >= h && 600 >= winTop) {
51         $(fixedItem).addClass('default');
52         $('.page-top .header-dmy').css({display: 'block',height: h});
53      } else {
54         $(fixedItem).addClass('fixed default');
55         $('.page-top .slidenav').css({top: '92px'});
56      }
57    });
58  }
59});
60
61$(function(){
62  if (window.matchMedia("(max-width: 768px)").matches) {
63    $('#top-link-natural').wrap('<a href="https://www.capony-wakanyaku.co.jp/natural" />');
64    $('#top-link-factory').wrap('<a href="https://www.capony-wakanyaku.co.jp/factory" />');
65    $('#top-link-environment').wrap('<a href="https://www.capony-wakanyaku.co.jp/environment" />');
66  }
67});
68
69jQuery(function($){
70  if (window.matchMedia("(max-width: 768px)").matches) {
71    $(window).on('load scroll resize', function() {
72      // environment-bgが存在したら発火
73      if($('.environment-bg').length){
74        add_class_in_scrolling($('.environment-bg'));
75      }
76    });
77    // スクロールで要素が表示されている時にclassを付与する
78    function add_class_in_scrolling(target) {
79      // 指定した要素の次の要素
80      var nextElement = $('#environment2');
81      var winScroll = $(window).scrollTop();
82      var winHeight = $(window).height();
83      // ウィンドウの最下部の位置取得
84      var scrollPos = winScroll + winHeight;
85      // 指定した要素が画面内に入ったらclass付与して出たら削除
86      if(target.offset().top - 100 < scrollPos && nextElement.offset().top + winHeight + 100 > scrollPos) {
87        target.addClass('show');
88      }else{
89        target.removeClass('show');
90      }
91    }
92  }
93});
94
95$(window).scroll(function() {
96  if (window.matchMedia("(min-width: 768px)").matches) {
97    $("#sticky").each(function(){
98      var menuTopMargin = 100;
99      var parentY = $(this).parent().offset().top;
100      var parentH = $(this).parent().height();
101      var targetScrollValue = parentY - menuTopMargin;
102      var wScrollvalue = $(window).scrollTop();
103      var obj = {};
104      if(wScrollvalue > targetScrollValue){
105        if(wScrollvalue > (parentY + parentH) - (menuTopMargin +$(this).height()) ){
106          obj = {
107            position: "absolute",
108            top: parentH - $(this).height()
109            };
110          }
111        else{
112          obj = {
113            position: "fixed",
114            top: menuTopMargin
115            };
116          }
117        }
118      else{
119        obj = {
120          position: "absolute",
121          top: "0"
122          };
123        }
124      $(this).css(obj); //cssを適用
125    })
126  }
127});
128
129$(function() {
130  $('#top-slide').slick({
131    accessibility: false,
132    autoplay: true,
133    autoplaySpeed: 3000,
134    speed: 2000,
135    fade: true,
136    cssEase: 'ease-out',
137    arrows: false,
138    dots: false
139  });
140  $('#sec-slide').slick({
141    accessibility: false,
142    autoplay: true,
143    autoplaySpeed: 4000,
144    speed: 800,
145    cssEase: 'ease-out',
146    arrows: true,
147    dots: true
148  });
149  $('#products-slide').slick({
150    accessibility: false,
151    centerMode: true,
152    centerPadding: '10%',
153    autoplay: true,
154    autoplaySpeed: 4000,
155    speed: 800,
156    cssEase: 'ease-out',
157    arrows: true,
158    dots: false
159  });
160});
161
162$(function() {
163  $('#environment3').one('inview', function(event, isInView) {
164    if (isInView) {
165      setTimeout(function(){
166        $('#odo1').html(1288036000);
167      }, 200);
168      setTimeout(function(){
169        $('#odo2').html(1333132760);
170      }, 200);
171      setTimeout(function(){
172        $('#odo3').html(13210);
173      }, 200);
174      setTimeout(function(){
175        $('#odo4').html(49749);
176      }, 200);
177    }
178  });
179});
180
181$(function() {
182  $('.animated-fadein').one('inview', function(event, isInView) {
183    if (isInView) {
184      $(this).addClass('fadein');
185      $(this).css('opacity',1);
186    }
187  });
188  $('.animated-slide-left').one('inview', function(event, isInView) {
189    if (isInView) {
190      $(this).addClass('slide-left');
191      $(this).css('opacity',1);
192    }
193  });
194  $('.animated-slide-right').one('inview', function(event, isInView) {
195    if (isInView) {
196      $(this).addClass('slide-right');
197      $(this).css('opacity',1);
198    }
199  });
200  $('.animated-slide-up').one('inview', function(event, isInView) {
201    if (isInView) {
202      $(this).addClass('slide-up');
203      $(this).css('opacity',1);
204    }
205  });
206  $('.animated-slide-down').one('inview', function(event, isInView) {
207    if (isInView) {
208      $(this).addClass('slide-down');
209      $(this).css('opacity',1);
210    }
211  });
212  $('.animated-head').one('inview', function(event, isInView) {
213    if (isInView) {
214      $(this).addClass('slide-head');
215      $(this).css('opacity',1);
216    }
217  });
218});
219
220$(function() {
221  var state = false;
222  var scrollpos;
223  $('.trigger').on('click', function(){
224    if(state == false) {
225      scrollpos = $(window).scrollTop();
226      $('body').addClass('fixed').css({'top': -scrollpos});
227      $(this).parent('.bar').addClass('active');
228      $('.sp-menu').slideToggle('fast');
229      state = true;
230    } else {
231      $('body').removeClass('fixed').css({'top': 0});
232      window.scrollTo( 0 , scrollpos );
233      $(this).parent('.bar').removeClass('active');
234      $('.sp-menu').slideToggle('fast');
235      state = false;
236    }
237  });
238});
239
240
241$(function() {
242  $('a[href^=#]').on('click', function() {
243    var speed = 400;
244    var href = $(this).attr('href');
245    var target = $(href === '#' || href === '' ? 'html' : href);
246    var position = target.offset().top;
247    $('body, html').animate({
248      scrollTop: position
249    }, speed, 'swing');
250    return false;
251  });
252});
253
254$(function() {
255  $('.text-overflow').each(function() {
256    var $target = $(this);
257    var html = $target.html();
258    var $clone = $target.clone();
259    $clone
260      .css({
261        display: 'none',
262        position : 'absolute',
263        overflow : 'visible'
264      })
265      .width($target.width())
266      .height('auto');
267    $target.after($clone);
268    while((html.length > 0) && ($clone.height() > $target.height())) {
269      html = html.substr(0, html.length - 1);
270      $clone.html(html + '...');
271    }
272    $target.html($clone.html());
273    $clone.remove();
274  });
275});
276

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.