PageSourceSearch

https://bhn.jp/wp-content/themes/code_tcd090/js/jscript.js?ver=2.4.1

js bhn.jp collected 2026-10-02 17:27:58 UTC 9,081 bytes, 290 lines download raw bytes

1jQuery(document).ready(function($){
2
3  var $window = $(window);
4
5  $("a").bind("focus",function(){if(this.blur)this.blur();});
6  $("a.target_blank").attr("target","_blank");
7
8  //return top button
9  var return_top_button = $('#return_top');
10  $('a',return_top_button).click(function() {
11    var myHref= $(this).attr("href");
12    var myPos = $(myHref).offset().top;
13    $("html,body").animate({scrollTop : myPos}, 1000, 'easeOutExpo');
14    return false;
15  });
16  return_top_button.removeClass('active');
17  $window.scroll(function () {
18    if ($(this).scrollTop() > 100) {
19      return_top_button.addClass('active');
20    } else {
21      return_top_button.removeClass('active');
22    }
23  });
24
25
26  //fixed footer content
27  var fixedFooter = $('#fixed_footer_content');
28  fixedFooter.removeClass('active');
29  $window.scroll(function () {
30    if ($(this).scrollTop() > 330) {
31      fixedFooter.addClass('active');
32    } else {
33      fixedFooter.removeClass('active');
34    }
35  });
36  $('#fixed_footer_content .close').click(function() {
37    $("#fixed_footer_content").hide();
38    return false;
39  });
40
41
42  // comment button
43  $("#comment_tab li").click(function() {
44    $("#comment_tab li").removeClass('active');
45    $(this).addClass("active");
46    $(".tab_contents").hide();
47    var selected_tab = $(this).find("a").attr("href");
48    $(selected_tab).fadeIn();
49    return false;
50  });
51
52
53  //custom drop menu widget
54  $(".tcdw_custom_drop_menu li:has(ul)").addClass('parent_menu');
55  $(".tcdw_custom_drop_menu li").hover(function(){
56     $(">ul:not(:animated)",this).slideDown("fast");
57     $(this).addClass("active");
58  }, function(){
59     $(">ul",this).slideUp("fast");
60     $(this).removeClass("active");
61  });
62
63
64  // design select box widget
65  $(".design_select_box select").on("click" , function() {
66    $(this).closest('.design_select_box').toggleClass("open");
67  });
68  $(document).mouseup(function (e){
69    var container = $(".design_select_box");
70    if (container.has(e.target).length === 0) {
71      container.removeClass("open");
72    }
73  });
74
75
76  //archive list widget
77  if ($('.p-dropdown').length) {
78    $('.p-dropdown__title').click(function() {
79      $(this).toggleClass('is-active');
80      $('+ .p-dropdown__list:not(:animated)', this).slideToggle();
81    });
82  }
83
84
85  //category widget
86  $(".tcd_category_list li:has(ul)").addClass('parent_menu');
87  $(".tcd_category_list li.parent_menu > a").parent().prepend("<span class='child_menu_button'></span>");
88  $(".tcd_category_list li .child_menu_button").on('click',function() {
89     if($(this).parent().hasClass("open")) {
90       $(this).parent().removeClass("active");
91       $(this).parent().removeClass("open");
92       $(this).parent().find('>ul:not(:animated)').slideUp("fast");
93       return false;
94     } else {
95       $(this).parent().addClass("active");
96       $(this).parent().addClass("open");
97       $(this).parent().find('>ul:not(:animated)').slideDown("fast");
98       return false;
99     };
100  });
101
102
103  //search widget
104  $('.widget_search #searchsubmit').wrap('<div class="submit_button"></div>');
105  $('.google_search #searchsubmit').wrap('<div class="submit_button"></div>');
106// テキストウィジェットとHTMLウィジェットにエディターのクラスを追加する
107$('.widget_text .textwidget').addClass('post_content');
108
109  // quick tag - underline ------------------------------------------
110  if ($('.q_underline').length) {
111    var gradient_prefix = null;
112
113    $('.q_underline').each(function(){
114      var bbc = $(this).css('borderBottomColor');
115      if (jQuery.inArray(bbc, ['transparent', 'rgba(0, 0, 0, 0)']) == -1) {
116        if (gradient_prefix === null) {
117          gradient_prefix = '';
118          var ua = navigator.userAgent.toLowerCase();
119          if (/webkit/.test(ua)) {
120            gradient_prefix = '-webkit-';
121          } else if (/firefox/.test(ua)) {
122            gradient_prefix = '-moz-';
123          } else {
124            gradient_prefix = '';
125          }
126        }
127        $(this).css('borderBottomColor', 'transparent');
128        if (gradient_prefix) {
129          $(this).css('backgroundImage', gradient_prefix+'linear-gradient(left, transparent 50%, '+bbc+ ' 50%)');
130        } else {
131          $(this).css('backgroundImage', 'linear-gradient(to right, transparent 50%, '+bbc+ ' 50%)');
132        }
133      }
134    });
135
136    $window.on('scroll.q_underline', function(){
137      $('.q_underline:not(.is-active)').each(function(){
138        var top = $(this).offset().top;
139        if ($window.scrollTop() > top - window.innerHeight) {
140          $(this).addClass('is-active');
141        }
142      });
143      if (!$('.q_underline:not(.is-active)').length) {
144        $window.off('scroll.q_underline');
145      }
146    });
147  }
148
149
150// responsive ------------------------------------------------------------------------
151var mql = window.matchMedia('screen and (min-width: 1201px)');
152function checkBreakPoint(mql) {
153
154 if(mql.matches){ //PC
155
156   $("html").removeClass("mobile");
157   $("html").addClass("pc");
158
159   // bread crumb
160   if ($('#container #bread_crumb').length) {
161     $("#container #bread_crumb").clone().insertAfter("#header_logo");
162     $("#container #bread_crumb").remove();
163   }
164
165   // mega menu
166   if ($('#mega_menu_mobile_header_top #side_sns').length) {
167     $("#mega_menu_mobile_header_top #side_sns").clone().appendTo("#side_menu");
168     $("#mega_menu_mobile_header_top #side_sns").remove();
169   }
170   if ($('#mega_menu_mobile_header_top #site_desc').length) {
171     $("#mega_menu_mobile_header_top #site_desc").clone().prependTo("#side_menu");
172     $("#mega_menu_mobile_header_top #site_desc").remove();
173   }
174
175   // header search
176   $("#header_search").hover(function(){
177      $(this).addClass("active");
178      $('#header_search_input').focus();
179   }, function(){
180      $(this).removeClass("active");
181   });
182
183 } else { //smart phone
184
185   $("html").removeClass("pc");
186   $("html").addClass("mobile");
187
188   // header search
189   $("#header_search").off('mouseenter mouseleave');
190   $("#mobile_header_search_button").on('click',function() {
191     $('body').toggleClass('active_header_search');
192      $('#container').on('click', function(e){
193        if($('body').hasClass('active_header_search')){
194          $('body').removeClass('active_header_search');
195          return false;
196        };
197      });
198   });
199
200   // bread crumb
201   if ($('#bread_crumb').length) {
202     $("#bread_crumb").clone().prependTo("#container");
203     $("#header #bread_crumb").remove();
204   }
205
206   // mega menu
207   if ($('#mega_menu_mobile_header').length && $('#side_sns').length) {
208     $("#side_sns").clone().insertBefore(".mobile_close_button");
209     $("#side_menu #side_sns").remove();
210   }
211   if ($('#mega_menu_mobile_header').length && $('#site_desc').length) {
212     $("#site_desc").clone().prependTo("#mega_menu_mobile_header_top");
213     $("#side_menu #site_desc").remove();
214   }
215
216   // perfect scroll
217   if ($('#drawer_menu').length) {
218     if(! $(body).hasClass('mobile_device') ) {
219       new SimpleBar($('#drawer_menu')[0]);
220     };
221   };
222
223   // drawer menu
224   $("#mobile_menu .child_menu_button").remove();
225   $('#mobile_menu li > ul').parent().prepend("<span class='child_menu_button'><span class='icon'></span></span>");
226   $("#mobile_menu .child_menu_button").on('click',function() {
227     if($(this).parent().hasClass("open")) {
228       $(this).parent().removeClass("open");
229       $(this).parent().find('>ul:not(:animated)').slideUp("fast");
230       return false;
231     } else {
232       $(this).parent().addClass("open");
233       $(this).parent().find('>ul:not(:animated)').slideDown("fast");
234       return false;
235     };
236   });
237
238   // drawer menu button
239   var menu_button = $('#global_menu_button');
240   menu_button.off();
241   menu_button.removeAttr('style');
242   menu_button.toggleClass("active",false);
243
244  // open drawer menu
245   menu_button.on('click', function(e) {
246
247      e.preventDefault();
248      e.stopPropagation();
249      $('html').toggleClass('open_menu');
250
251      $('#container').one('click', function(e){
252        if($('html').hasClass('open_menu')){
253          $('html').removeClass('open_menu');
254          return false;
255        };
256      });
257
258   });
259
260  // animation scroll link
261  $('#mobile_menu a[href^="#"]').click(function() {
262    var myHref= $(this).attr("href");
263    if($("html").hasClass("mobile") && $("body").hasClass("use_mobile_header_fix")) {
264      var myPos = $(myHref).offset().top - 60;
265    } else if($("html").hasClass("mobile")) {
266      var myPos = $(myHref).offset().top;
267    } else if($("html").hasClass("pc") && $("body").hasClass("use_header_fix")) {
268      if($("html").hasClass("pc") && $("body").hasClass("menu_type2 hide_header_logo hide_global_menu")) {
269        var myPos = $(myHref).offset().top;
270      } else {
271        var myPos = $(myHref).offset().top - 80;
272      }
273    } else {
274      var myPos = $(myHref).offset().top;
275    }
276    $("html,body").animate({scrollTop : myPos}, 1000, 'easeOutExpo');
277    if($('html').hasClass('open_menu')){
278      $('html').removeClass('open_menu');
279      return false;
280    };
281    return false;
282  });
283
284 };
285};
286mql.addListener(checkBreakPoint);
287checkBreakPoint(mql);
288
289
290});

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.