PageSourceSearch

https://soulbeauty.jp/ceremony/wp-content/themes/haku_tcd080/js/jscript.js?ver=2.3.1

js soulbeauty.jp collected 2026-09-24 15:05:25 UTC 13,157 bytes, 425 lines download raw bytes

1jQuery(document).ready(function($){
2
3  var $window = $(window);
4
5  // mega menu -------------------------------------------------
6
7  // mega menu post list animation
8  $(document).on({mouseenter : function(){
9    $(this).parent().siblings().removeClass('active')
10    $(this).parent().addClass('active');
11    var $content_id = "." + $(this).attr('class');
12    $(this).closest('.megamenu_blog_list').find(".megamenu_blog_slider_wrap").hide();
13    $($content_id).show();
14    if( $('.megamenu_blog_slider').length ){
15      $('.megamenu_blog_slider').slick('setPosition');
16    };
17    return false;
18  }}, '.megamenu_blog_list .menu_area a');
19
20  // mega menu basic animation
21  $('[data-megamenu]').each(function() {
22
23    var mega_menu_button = $(this);
24    var sub_menu_wrap =  "#" + $(this).data("megamenu");
25    var hide_sub_menu_timer;
26    var hide_sub_menu_interval = function() {
27      if (hide_sub_menu_timer) {
28        clearInterval(hide_sub_menu_timer);
29        hide_sub_menu_timer = null;
30      }
31      hide_sub_menu_timer = setInterval(function() {
32        if (!$(mega_menu_button).is(':hover') && !$(sub_menu_wrap).is(':hover')) {
33          $(sub_menu_wrap).stop().css('z-index','100').hide();
34          clearInterval(hide_sub_menu_timer);
35          hide_sub_menu_timer = null;
36        }
37      }, 20);
38    };
39
40    mega_menu_button.hover(
41     function(){
42       if (hide_sub_menu_timer) {
43         clearInterval(hide_sub_menu_timer);
44         hide_sub_menu_timer = null;
45       }
46       if ($('html').hasClass('pc')) {
47         $(this).parent().addClass('active_button');
48         $(this).parent().find("ul").addClass('megamenu_child_menu');
49         $(sub_menu_wrap).stop().css('z-index','200').show();
50         if( $('.megamenu_blog_slider').length ){
51           $('.megamenu_blog_slider').slick('setPosition');
52         };
53       }
54     },
55     function(){
56       if ($('html').hasClass('pc')) {
57         $(this).parent().removeClass('active_button');
58         $(this).parent().find("ul").removeClass('megamenu_child_menu');
59         hide_sub_menu_interval();
60       }
61     }
62    );
63
64    $(sub_menu_wrap).hover(
65      function(){
66        $(mega_menu_button).parent().addClass('active_button');
67      },
68      function(){
69        $(mega_menu_button).parent().removeClass('active_button');
70      }
71    );
72
73
74    $('#header').on('mouseout', sub_menu_wrap, function(){
75     if ($('html').hasClass('pc')) {
76       hide_sub_menu_interval();
77     }
78    });
79
80  }); // end mega menu
81
82  // mega menu category link
83  $('.megamenu_product_category_list a[data-anchor^="#"]').click(function(){
84    var anthor = $(this).attr('data-anchor');
85    if (!anthor) return;
86    var $target = $(anthor);
87    if ($target.length) {
88      var $button = $('#category_button a[href="'+anthor+'"]');
89      if ($button.length) {
90        $button.click();
91        return false;
92      } else {
93        if ($('body').hasClass('use_header_fix')) {
94          var targetTop = $target.offset().top - 130;
95        } else {
96          var targetTop = $target.offset().top - 60;
97        }
98        $('html, body').animate({scrollTop : targetTop}, 1000, 'easeOutExpo');
99        return false;
100      }
101    }
102  });
103
104  // index slider button
105  $("#header_slider_button").off('click');
106  $("#header_slider_button").on('click',function() {
107    var myHref= $(this).attr("href");
108    if($("body").hasClass("use_header_fix")) {
109      var myPos = $(myHref).offset().top - 70;
110    } else {
111      var myPos = $(myHref).offset().top;
112    }
113    $("html,body").animate({scrollTop : myPos}, 1000, 'easeOutExpo');
114    return false;
115  });
116
117  // 404 button
118  $("#page_404_button").off('click');
119  $("#page_404_button").on('click',function() {
120    var myHref= $(this).attr("href");
121    var myPos = $(myHref).offset().top;
122    $("html,body").animate({scrollTop : myPos}, 1000, 'easeOutExpo');
123    return false;
124  });
125
126  $("a").bind("focus",function(){if(this.blur)this.blur();});
127  $("a.target_blank").attr("target","_blank");
128
129
130  //return top button
131  var return_top_button = $('#return_top');
132  $('a',return_top_button).click(function() {
133    var myHref= $(this).attr("href");
134    var myPos = $(myHref).offset().top;
135    $("html,body").animate({scrollTop : myPos}, 1000, 'easeOutExpo');
136    return false;
137  });
138  return_top_button.removeClass('active');
139  $window.scroll(function () {
140    if ($(this).scrollTop() > 100) {
141      return_top_button.addClass('active');
142    } else {
143      return_top_button.removeClass('active');
144    }
145  });
146
147
148  //fixed footer content
149  var fixedFooter = $('#fixed_footer_content');
150  fixedFooter.removeClass('active');
151  $window.scroll(function () {
152    if ($(this).scrollTop() > 330) {
153      fixedFooter.addClass('active');
154    } else {
155      fixedFooter.removeClass('active');
156    }
157  });
158  $('#fixed_footer_content .close').click(function() {
159    $("#fixed_footer_content").hide();
160    return false;
161  });
162
163
164  // comment button
165  $("#comment_tab li").click(function() {
166    $("#comment_tab li").removeClass('active');
167    $(this).addClass("active");
168    $(".tab_contents").hide();
169    var selected_tab = $(this).find("a").attr("href");
170    $(selected_tab).fadeIn();
171    return false;
172  });
173
174
175  //custom drop menu widget
176  $(".tcdw_custom_drop_menu li:has(ul)").addClass('parent_menu');
177  $(".tcdw_custom_drop_menu li").hover(function(){
178     $(">ul:not(:animated)",this).slideDown("fast");
179     $(this).addClass("active");
180  }, function(){
181     $(">ul",this).slideUp("fast");
182     $(this).removeClass("active");
183  });
184
185
186  // design select box widget
187  $(".design_select_box select").on("click" , function() {
188    $(this).closest('.design_select_box').toggleClass("open");
189  });
190  $(document).mouseup(function (e){
191    var container = $(".design_select_box");
192    if (container.has(e.target).length === 0) {
193      container.removeClass("open");
194    }
195  });
196
197
198  //archive list widget
199  if ($('.p-dropdown').length) {
200    $('.p-dropdown__title').click(function() {
201      $(this).toggleClass('is-active');
202      $('+ .p-dropdown__list:not(:animated)', this).slideToggle();
203    });
204  }
205
206  //category widget
207  $(".p-dropdown li:has(ul)").addClass('parent_menu');
208  $(".p-dropdown li.parent_menu > a").parent().prepend("<span class='child_menu_button'></span>");
209  $(".p-dropdown li .child_menu_button").on('click',function() {
210     if($(this).parent().hasClass("open")) {
211       $(this).parent().removeClass("active");
212       $(this).parent().removeClass("open");
213       $(this).parent().find('>ul:not(:animated)').slideUp("fast");
214       return false;
215     } else {
216       $(this).parent().addClass("active");
217       $(this).parent().addClass("open");
218       $(this).parent().find('>ul:not(:animated)').slideDown("fast");
219       return false;
220     };
221  });
222
223
224  //search widget
225  $('.widget_search #searchsubmit').wrap('<div class="submit_button"></div>');
226  $('.google_search #searchsubmit').wrap('<div class="submit_button"></div>');
227  
228  //calendar widget
229  $('.wp-calendar-table td').each(function () {
230    if ( $(this).children().length == 0 ) {
231      $(this).addClass('no_link');
232      $(this).wrapInner('<span></span>');
233    } else {
234      $(this).addClass('has_link');
235    }
236  });
237
238// テキストウィジェットとHTMLウィジェットにエディターのクラスを追加する
239$('.widget_text .textwidget').addClass('post_content');
240
241// アーカイブとカテゴリーのセレクトボックスにselect_wrapのクラスを追加する
242  $('.widget_archive select').wrap('<div class="select_wrap"></div>');
243  $('.widget_categories form').wrap('<div class="select_wrap"></div>');
244
245  // quick tag - underline ------------------------------------------
246  if ($('.q_underline').length) {
247    var gradient_prefix = null;
248
249    $('.q_underline').each(function(){
250      var bbc = $(this).css('borderBottomColor');
251      if (jQuery.inArray(bbc, ['transparent', 'rgba(0, 0, 0, 0)']) == -1) {
252        if (gradient_prefix === null) {
253          gradient_prefix = '';
254          var ua = navigator.userAgent.toLowerCase();
255          if (/webkit/.test(ua)) {
256            gradient_prefix = '-webkit-';
257          } else if (/firefox/.test(ua)) {
258            gradient_prefix = '-moz-';
259          } else {
260            gradient_prefix = '';
261          }
262        }
263        $(this).css('borderBottomColor', 'transparent');
264        if (gradient_prefix) {
265          $(this).css('backgroundImage', gradient_prefix+'linear-gradient(left, transparent 50%, '+bbc+ ' 50%)');
266        } else {
267          $(this).css('backgroundImage', 'linear-gradient(to right, transparent 50%, '+bbc+ ' 50%)');
268        }
269      }
270    });
271
272    $window.on('scroll.q_underline', function(){
273      $('.q_underline:not(.is-active)').each(function(){
274        var top = $(this).offset().top;
275        if ($window.scrollTop() > top - window.innerHeight) {
276          $(this).addClass('is-active');
277        }
278      });
279      if (!$('.q_underline:not(.is-active)').length) {
280        $window.off('scroll.q_underline');
281      }
282    });
283  }
284
285
286// responsive ------------------------------------------------------------------------
287var mql = window.matchMedia('screen and (min-width: 1001px)');
288function checkBreakPoint(mql) {
289
290 if(mql.matches){ //PC
291
292   $("html").removeClass("mobile");
293   $("html").addClass("pc");
294
295   // lang button
296   $("#lang_button").css("display","block");
297
298   $("#menu_button").css("display","none");
299
300   $('a.megamenu_button').parent().addClass('megamenu_parent');
301
302   $("#global_menu li:not(.megamenu_parent)").hover(function(){
303     $(">ul:not(:animated)",this).slideDown("fast");
304     $(this).addClass("active");
305   }, function(){
306     $(">ul",this).slideUp("fast");
307     $(this).removeClass("active");
308   });
309
310   $("#header").hover(function(){
311     $('#header').addClass("active");
312   }, function(){
313     $('#header').removeClass("active");
314   });
315
316   // product category page button
317   $("#product_archive #category_button a").off('click');
318   $("#product_archive #category_button a").on('click',function() {
319     $("#product_archive #category_button a").removeClass('active');
320     $(this).addClass('active');
321     var myHref= $(this).attr("href");
322     if($(body).hasClass('use_header_fix') ) {
323       var myPos = $(myHref).offset().top - 130;
324     } else {
325       var myPos = $(myHref).offset().top - 60;
326     }
327     $("html,body").animate({scrollTop : myPos}, 1000, 'easeOutExpo');
328     return false;
329   });
330
331 } else { //smart phone
332
333   $("html").removeClass("pc");
334   $("html").addClass("mobile");
335
336   $("#header").removeClass("animate");
337   $("#header").removeClass("animate2");
338
339   // lang button
340   $("#lang_button").css("display","none");
341   $("#lang_mobile_button").on('click', function(e) {
342      if($(this).hasClass("active")) {
343        $(this).removeClass("active");
344        $(this).next('ul:not(:animated)').slideUp("fast");
345        return false;
346      } else {
347        $(this).addClass("active");
348        $(this).next('ul:not(:animated)').slideDown("fast");
349        return false;
350      };
351   });
352
353   // perfect scroll
354   if ($('#drawer_menu').length) {
355     if(! $(body).hasClass('mobile_device') ) {
356       new SimpleBar($('#drawer_menu')[0]);
357     };
358   };
359
360   // side menu
361   $("#mobile_menu .child_menu_button").remove();
362   $('#mobile_menu li > ul').parent().prepend("<span class='child_menu_button'><span class='icon'></span></span>");
363   $("#mobile_menu .child_menu_button").on('click',function() {
364     if($(this).parent().hasClass("open")) {
365       $(this).parent().removeClass("open");
366       $(this).parent().find('>ul:not(:animated)').slideUp("fast");
367       return false;
368     } else {
369       $(this).parent().addClass("open");
370       $(this).parent().find('>ul:not(:animated)').slideDown("fast");
371       return false;
372     };
373   });
374
375   // drawer menu button
376   var menu_button = $('#menu_button');
377   menu_button.off();
378   menu_button.removeAttr('style');
379   menu_button.toggleClass("active",false);
380
381  // open drawer menu
382   menu_button.on('click', function(e) {
383
384      e.preventDefault();
385      e.stopPropagation();
386      $('html').toggleClass('open_menu');
387
388      // fix position for ios
389      var topPosition = $window.scrollTop();
390      $('body').css({'position':'fixed','top': - topPosition});
391
392      $('#container,#mobile_menu a[href*="#"]').one('click', function(e){
393        if($('html').hasClass('open_menu')){
394          $('html').removeClass('open_menu');
395
396          // clear fix position for ios
397          $('body').css({'position':'','top': ''});
398          $window.scrollTop(topPosition);
399        };
400      });
401
402   });
403
404   // product category page button
405   $("#product_archive #category_button a").off('click');
406   $("#product_archive #category_button a").on('click',function() {
407     $("#product_archive #category_button a").removeClass('active');
408     $(this).addClass('active');
409     var myHref= $(this).attr("href");
410     if($(body).hasClass('use_mobile_header_fix') ) {
411       var myPos = $(myHref).offset().top - 100;
412     } else {
413       var myPos = $(myHref).offset().top - 40;
414     }
415     $("html,body").animate({scrollTop : myPos}, 1000, 'easeOutExpo');
416     return false;
417   });
418
419 };
420};
421mql.addListener(checkBreakPoint);
422checkBreakPoint(mql);
423
424
425});

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.