PageSourceSearch

https://business-search-abroad.com/wp-content/themes/force_tcd078/js/jscript.js?ver=1.15.2

js business-search-abroad.com collected 2026-10-08 17:34:58 UTC 9,795 bytes, 328 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 basic animation
31  $('[data-megamenu]').each(function() {
32
33    var mega_menu_button = $(this);
34    var sub_menu_wrap =  "#" + $(this).data("megamenu");
35    var hide_sub_menu_timer;
36    var hide_sub_menu_interval = function() {
37      if (hide_sub_menu_timer) {
38        clearInterval(hide_sub_menu_timer);
39        hide_sub_menu_timer = null;
40      }
41      hide_sub_menu_timer = setInterval(function() {
42        if (!$(mega_menu_button).is(':hover') && !$(sub_menu_wrap).is(':hover')) {
43          $(sub_menu_wrap).stop().css('z-index','100').hide();
44          clearInterval(hide_sub_menu_timer);
45          hide_sub_menu_timer = null;
46        }
47      }, 20);
48    };
49
50    mega_menu_button.hover(
51     function(){
52       if (hide_sub_menu_timer) {
53         clearInterval(hide_sub_menu_timer);
54         hide_sub_menu_timer = null;
55       }
56       if ($('html').hasClass('pc')) {
57         $(this).parent().addClass('active_button');
58         $(this).parent().find("ul").addClass('megamenu_child_menu');
59         $(sub_menu_wrap).stop().css('z-index','200').show();
60         if( $('.megamenu_blog_slider').length ){
61           $('.megamenu_blog_slider').slick('setPosition');
62         };
63       }
64     },
65     function(){
66       if ($('html').hasClass('pc')) {
67         $(this).parent().removeClass('active_button');
68         $(this).parent().find("ul").removeClass('megamenu_child_menu');
69         hide_sub_menu_interval();
70       }
71     }
72    );
73
74    $(sub_menu_wrap).hover(
75      function(){
76        $(mega_menu_button).parent().addClass('active_button');
77      },
78      function(){
79        $(mega_menu_button).parent().removeClass('active_button');
80      }
81    );
82
83
84    $('#header').on('mouseout', sub_menu_wrap, function(){
85     if ($('html').hasClass('pc')) {
86       hide_sub_menu_interval();
87     }
88    });
89
90  }); // end mega menu
91
92
93  $("a").bind("focus",function(){if(this.blur)this.blur();});
94  $("a.target_blank").attr("target","_blank");
95
96
97  //return top button
98  var return_top_button = $('#return_top');
99  $('a',return_top_button).click(function() {
100    var myHref= $(this).attr("href");
101    var myPos = $(myHref).offset().top;
102    $("html,body").animate({scrollTop : myPos}, 1000, 'easeOutExpo');
103    return false;
104  });
105  return_top_button.removeClass('active');
106  $(window).scroll(function () {
107    if ($(this).scrollTop() > 100) {
108      return_top_button.addClass('active');
109    } else {
110      return_top_button.removeClass('active');
111    }
112  });
113
114
115  //fixed footer content
116  var fixedFooter = $('#fixed_footer_content');
117  fixedFooter.removeClass('active');
118  $(window).scroll(function () {
119    if ($(this).scrollTop() > 330) {
120      fixedFooter.addClass('active');
121    } else {
122      fixedFooter.removeClass('active');
123    }
124  });
125  $('#fixed_footer_content .close').click(function() {
126    $("#fixed_footer_content").hide();
127    return false;
128  });
129
130
131  // comment button
132  $("#comment_tab li").click(function() {
133    $("#comment_tab li").removeClass('active');
134    $(this).addClass("active");
135    $(".tab_contents").hide();
136    var selected_tab = $(this).find("a").attr("href");
137    $(selected_tab).fadeIn();
138    return false;
139  });
140
141
142  //custom drop menu widget
143  $(".tcdw_custom_drop_menu li:has(ul)").addClass('parent_menu');
144  $(".tcdw_custom_drop_menu li").hover(function(){
145     $(">ul:not(:animated)",this).slideDown("fast");
146     $(this).addClass("active");
147  }, function(){
148     $(">ul",this).slideUp("fast");
149     $(this).removeClass("active");
150  });
151
152
153  // design select box widget
154  $(".design_select_box select").on("click" , function() {
155    $(this).closest('.design_select_box').toggleClass("open");
156  });
157  $(document).mouseup(function (e){
158    var container = $(".design_select_box");
159    if (container.has(e.target).length === 0) {
160      container.removeClass("open");
161    }
162  });
163
164
165  //archive list widget
166  if ($('.p-dropdown').length) {
167    $('.p-dropdown__title').click(function() {
168      $(this).toggleClass('is-active');
169      $('+ .p-dropdown__list:not(:animated)', this).slideToggle();
170    });
171  }
172
173  //category widget
174  $(".p-dropdown li:has(ul)").addClass('parent_menu');
175  $(".p-dropdown li.parent_menu > a").parent().prepend("<span class='child_menu_button'></span>");
176  $(".p-dropdown li .child_menu_button").on('click',function() {
177     if($(this).parent().hasClass("open")) {
178       $(this).parent().removeClass("active");
179       $(this).parent().removeClass("open");
180       $(this).parent().find('>ul:not(:animated)').slideUp("fast");
181       return false;
182     } else {
183       $(this).parent().addClass("active");
184       $(this).parent().addClass("open");
185       $(this).parent().find('>ul:not(:animated)').slideDown("fast");
186       return false;
187     };
188  });
189
190
191  //search widget
192  $('.widget_search #searchsubmit').wrap('<div class="submit_button"></div>');
193  $('.google_search #searchsubmit').wrap('<div class="submit_button"></div>');
194
195
196  //search widget
197  $('.widget_search #searchsubmit').wrap('<div class="submit_button"></div>');
198  $('.google_search #searchsubmit').wrap('<div class="submit_button"></div>');
199
200  //calendar widget
201  $('.wp-calendar-table td').each(function () {
202    if ( $(this).children().length == 0 ) {
203      $(this).addClass('no_link');
204      $(this).wrapInner('<span></span>');
205    } else {
206      $(this).addClass('has_link');
207    }
208  });
209
210// テキストウィジェットとHTMLウィジェットにエディターのクラスを追加する
211$('.widget_text .textwidget').addClass('post_content');
212
213// アーカイブとカテゴリーのセレクトボックスにselect_wrapのクラスを追加する
214  $('.widget_archive select').wrap('<div class="select_wrap"></div>');
215  $('.widget_categories form').wrap('<div class="select_wrap"></div>');
216
217
218
219// responsive ------------------------------------------------------------------------
220var mql = window.matchMedia('screen and (min-width: 1001px)');
221function checkBreakPoint(mql) {
222
223 if(mql.matches){ //PC
224
225   $("html").removeClass("mobile");
226   $("html").addClass("pc");
227
228   $("#menu_button").css("display","none");
229
230   $('a.megamenu_button').parent().addClass('megamenu_parent');
231
232   $("#global_menu li:not(.megamenu_parent)").hover(function(){
233     $(">ul:not(:animated)",this).slideDown("fast");
234     $(this).addClass("active");
235   }, function(){
236     $(">ul",this).slideUp("fast");
237     $(this).removeClass("active");
238   });
239
240//   $("#global_menu, .megamenu_gallery_category_list, .megamenu_blog_list").hover(function(){
241   $("#header").hover(function(){
242     $('#header').addClass("active");
243   }, function(){
244     $('#header').removeClass("active");
245   });
246
247 } else { //smart phone
248
249   $("html").removeClass("pc");
250   $("html").addClass("mobile");
251
252   $("#header").removeClass("animate");
253   $("#header").removeClass("animate2");
254
255   // perfect scroll
256   if ($('#drawer_menu').length) {
257     if(! $(body).hasClass('mobile_device') ) {
258       new SimpleBar($('#drawer_menu')[0]);
259     };
260   };
261
262   // side menu
263   $("#mobile_menu .child_menu_button").remove();
264   $('#mobile_menu li > ul').parent().prepend("<span class='child_menu_button'><span class='icon'></span></span>");
265   $("#mobile_menu .child_menu_button").on('click',function() {
266     if($(this).parent().hasClass("open")) {
267       $(this).parent().removeClass("open");
268       $(this).parent().find('>
268ul:not(:animated)').slideUp("fast");
269       return false;
270     } else {
271       $(this).parent().addClass("open");
272       $(this).parent().find('>ul:not(:animated)').slideDown("fast");
273       return false;
274     };
275   });
276
277   // drawer menu button
278   var menu_button = $('#menu_button');
279   menu_button.off();
280   menu_button.removeAttr('style');
281   menu_button.toggleClass("active",false);
282
283  // open drawer menu
284   menu_button.on('click', function(e) {
285
286      e.preventDefault();
287      e.stopPropagation();
288      $('html').toggleClass('open_menu');
289
290      // fix position for ios
291      var topPosition = $(window).scrollTop();
292      $('body').css({'position':'fixed','top': - topPosition});
293
294      $('#container').one('click', function(e){
295        if($('html').hasClass('open_menu')){
296          $('html').removeClass('open_menu');
297
298          // clear fix position for ios
299          $('body').css({'position':'','top': ''});
300          $(window).scrollTop(topPosition);
301
302          return false;
303        };
304      });
305
306   });
307
308 };
309};
310mql.addListener(checkBreakPoint);
311checkBreakPoint(mql);
312
313$(window).on("load", function() {
314  const $image = $("#footer_logo .mobile_logo_image");
315  if ($image.length) {
316    const screenWidth = $(window).width();
317
318    const imageWidth = parseInt($image.attr("width"), 10);
319    console.log($image);
320    if (imageWidth > screenWidth) {
321      $image.css("width", "95%");
322      $image.removeAttr("height");
323    }
324  }
325});
326
327
328});

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.