PageSourceSearch

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

js soulbeauty.jp collected 2026-09-24 15:04:49 UTC 12,664 bytes, 408 lines download raw bytes

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

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.