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 // inner link --------------------------------- 9 $(':is(.post_content, .p-toc) a[href*=#]').click(function() { 10 var speed = 1000, 11 href = $(this).prop("href"), 12 hrefPageUrl = href.split("#")[0], 13 currentUrl = location.href, 14 currentUrl = currentUrl.split("#")[0]; 15 if(hrefPageUrl == currentUrl){ 16 href = href.split("#"); 17 href = href.pop(); 18 href = "#" + href; 19 var target = $(href == "#" || href == "" ? 'html' : href); 20 if( target.length ){ 21 var position = target.offset().top - 30, 22 body = 'html', 23 userAgent = window.navigator.userAgent.toLowerCase(), 24 header_height = $('html.pc .use_header_fix #header, html.mobile .use_mobile_header_fix #header').innerHeight() || 0; 25 $(body).animate({ scrollTop: position - header_height }, speed, 'easeOutExpo'); 26 } 27 return false; 28 } 29 }); 30 31 // mega menu ------------------------------------------------- 32 33 // mega menu post list animation 34 $(document).on({mouseenter : function(){ 35 $(this).parent().siblings().removeClass('active') 36 $(this).parent().addClass('active'); 37 var $content_id = "." + $(this).attr('data-cat-id'); 38 $(".megamenu_blog_list .post_list").removeClass('active') 39 $($content_id).eq(0).addClass('active') 40 return false; 41 }}, '.megamenu_blog_list .category_list 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').removeClass('active_mega_menu'); 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 $('#header').addClass('active'); 71 $(this).parent().addClass('active_megamenu_button'); 72 $(this).parent().find("ul").addClass('megamenu_child_menu'); 73 $(sub_menu_wrap).stop().css('z-index','200').addClass('active_mega_menu'); 74 if( $('.megamenu_blog_slider').length ){ 75 $('.megamenu_blog_slider').slick('setPosition'); 76 }; 77 } 78 }, 79 function(){ 80 if ($('html').hasClass('pc')) { 81 if (!$('#header').hasClass('fix_active')) { 82 $('#header').removeClass('active'); 83 } 84 $(this).parent().removeClass('active_megamenu_button'); 85 $(this).parent().find("ul").removeClass('megamenu_child_menu'); 86 hide_sub_menu_interval(); 87 } 88 } 89 ); 90 91 $(sub_menu_wrap).hover( 92 function(){ 93 $('#header').addClass('active'); 94 $(mega_menu_button).parent().addClass('active_megamenu_button'); 95 }, 96 function(){ 97 if (!$('#header').hasClass('fix_active')) { 98 $('#header').removeClass('active'); 99 } 100 $(mega_menu_button).parent().removeClass('active_megamenu_button'); 101 } 102 ); 103 104 105 $('#header').on('mouseout', sub_menu_wrap, function(){ 106 if ($('html').hasClass('pc')) { 107 hide_sub_menu_interval(); 108 } 109 }); 110 111 }); // end mega menu 112 113 114 //return top button 115 var return_top_button = $('#return_top'); 116 $('a',return_top_button).click(function() { 117 var myHref= $(this).attr("href"); 118 var myPos = $(myHref).offset().top; 119 $("html,body").animate({scrollTop : myPos}, 1000, 'easeOutExpo'); 120 return false; 121 }); 122 return_top_button.removeClass('active'); 123 $window.scroll(function () { 124 if ($(this).scrollTop() > 100) { 125 return_top_button.addClass('active'); 126 } else { 127 return_top_button.removeClass('active'); 128 } 129 }); 130 131 132 //fixed footer content 133 var fixedFooter = $('#fixed_footer_content'); 134 fixedFooter.removeClass('active'); 135 $window.scroll(function () { 136 if ($(this).scrollTop() > 330) { 137 fixedFooter.addClass('active'); 138 } else { 139 fixedFooter.removeClass('active'); 140 } 141 }); 142 $('#fixed_footer_content .close').click(function() { 143 $("#fixed_footer_content").hide(); 144 return false;
145 }); 146 147 148 // comment button 149 $("#comment_tab li").click(function() { 150 $("#comment_tab li").removeClass('active'); 151 $(this).addClass("active"); 152 $(".tab_contents").hide(); 153 var selected_tab = $(this).find("a").attr("href"); 154 $(selected_tab).fadeIn(); 155 return false; 156 }); 157 158 159 //custom drop menu widget 160 $(".tcdw_custom_drop_menu li:has(ul)").addClass('parent_menu'); 161 $(".tcdw_custom_drop_menu li").hover(function(){ 162 $(">ul:not(:animated)",this).slideDown("fast"); 163 $(this).addClass("active"); 164 }, function(){ 165 $(">ul",this).slideUp("fast"); 166 $(this).removeClass("active"); 167 }); 168 169 170 // design select box widget 171 $(".design_select_box select").on("click" , function() { 172 $(this).closest('.design_select_box').toggleClass("open"); 173 }); 174 $(document).mouseup(function (e){ 175 var container = $(".design_select_box"); 176 if (container.has(e.target).length === 0) { 177 container.removeClass("open"); 178 } 179 }); 180 181 182 // ã¿ãè¨äºã¦ã£ã¸ã§ãã 183 $('.widget_tab_post_list_button').on('click', '.tab1', function(){ 184 $(this).siblings().removeClass('active'); 185 $(this).addClass('active'); 186 $(this).closest('.tab_post_list_widget').find('.widget_tab_post_list1').addClass('active'); 187 $(this).closest('.tab_post_list_widget').find('.widget_tab_post_list2').removeClass('active'); 188 $(this).closest('.tab_post_list_widget').find('.widget_tab_post_list3').removeClass('active'); 189 return false; 190 }); 191 $('.widget_tab_post_list_button').on('click', '.tab2', function(){ 192 $(this).siblings().removeClass('active'); 193 $(this).addClass('active'); 194 $(this).closest('.tab_post_list_widget').find('.widget_tab_post_list1').removeClass('active'); 195 $(this).closest('.tab_post_list_widget').find('.widget_tab_post_list2').addClass('active'); 196 $(this).closest('.tab_post_list_widget').find('.widget_tab_post_list3').removeClass('active'); 197 return false; 198 }); 199 $('.widget_tab_post_list_button').on('click', '.tab3', function(){ 200 $(this).siblings().removeClass('active'); 201 $(this).addClass('active'); 202 $(this).closest('.tab_post_list_widget').find('.widget_tab_post_list1').removeClass('active'); 203 $(this).closest('.tab_post_list_widget').find('.widget_tab_post_list2').removeClass('active'); 204 $(this).closest('.tab_post_list_widget').find('.widget_tab_post_list3').addClass('active'); 205 return false; 206 }); 207 208 209 //archive list widget 210 if ($('.p-dropdown').length) { 211 $('.p-dropdown__title').click(function() { 212 $(this).toggleClass('is-active'); 213 $('+ .p-dropdown__list:not(:animated)', this).slideToggle(); 214 }); 215 } 216 217 218 //category widget 219 $(".tcd_category_list li:has(ul)").addClass('parent_menu'); 220 $(".tcd_category_list li.parent_menu > a").parent().prepend("<span class='child_menu_button'></span>"); 221 $(".tcd_category_list li .child_menu_button").on('click',function() { 222 if($(this).parent().hasClass("open")) { 223 $(this).parent().removeClass("active"); 224 $(this).parent().removeClass("open"); 225 $(this).parent().find('>ul:not(:animated)').slideUp("fast"); 226 return false; 227 } else { 228 $(this).parent().addClass("active"); 229 $(this).parent().addClass("open"); 230 $(this).parent().find('>ul:not(:animated)').slideDown("fast"); 231 return false; 232 }; 233 }); 234 235 236 //search widget 237 $('.widget_search #searchsubmit').wrap('<div class="submit_button"></div>'); 238 239 $('.widget_archive select').wrap('<div class="select_wrap"></div>'); 240 $('.widget_categories form').wrap('<div class="select_wrap"></div>'); 241 242 $('.widget_content .textwidget').addClass('post_content'); 243 244 $('.wp-calendar-table td').each(function () { 245 if ( $(this).children().length == 0 ) { 246 $(this).addClass('no_link'); 247 $(this).wrapInner('<span></span>'); 248 } else { 249 $(this).addClass('has_link'); 250 } 251 }); 252 253 254 // header search 255 $(document).on('change keyup', 'input#header_search_input', function(){ 256 if($(this).val() != ""){ 257 $('#header_search').addClass('active'); 258 } else { 259 $('#header_search').removeClass('active'); 260 } 261 }); 262 263 264 // header hover 265 $("#header").addClass("off_hover"); 266 $("#header").hover(function(){ 267 $(this).removeClass("off_hover"); 268 }, function(){ 269 $(this).addClass("off_hover"); 270 }); 271 272 273 // FAQãªã¹ããã·ã§ã¼ãã³ã¼ã
274 $('.sc_faq_list .title').on('click', function() { 275 var desc = $(this).next('.desc_area'); 276 var acc_height = desc.find('.desc').outerHeight(true); 277 if($(this).hasClass('active')){ 278 desc.css('height', ''); 279 $(this).removeClass('active'); 280 }else{ 281 desc.css('height', acc_height); 282 $(this).addClass('active'); 283 } 284 }); 285 286 287// responsive ------------------------------------------------------------------------ 288var mql = window.matchMedia('screen and (min-width: 1251px)'); 289function checkBreakPoint(mql) { 290 291 if(mql.matches){ //PC 292 293 $("html").removeClass("mobile"); 294 $("html").addClass("pc"); 295 296 $("#menu_button").css("display","none"); 297 298 $('a.megamenu_button.type2').parent().addClass('megamenu_parent_type2'); 299 $('a.megamenu_button.type3').parent().addClass('megamenu_parent_type3'); 300 301 $("#global_menu li:not(.megamenu_parent)").hover(function(){ 302 if( $(this).hasClass('menu-item-has-children') ){ 303 $(">ul:not(:animated)",this).slideDown("fast"); 304 $(this).addClass("active"); 305 $('#header').addClass("active"); 306 } 307 }, function(){ 308 if( $(this).hasClass('menu-item-has-children') ){ 309 $(">ul",this).slideUp("fast"); 310 $(this).removeClass("active"); 311 $('#header').removeClass("active"); 312 } 313 }); 314 315 } else { //smart phone 316 317 $("html").removeClass("pc"); 318 $("html").addClass("mobile"); 319 320 // perfect scroll 321 if ($('#drawer_menu').length) { 322 if(! $(body).hasClass('mobile_device') ) { 323 new SimpleBar($('#drawer_menu')[0]); 324 }; 325 }; 326/* 327 if ($('.mobile #index_tab_post_list .tab').length) { 328 if(! $(body).hasClass('mobile_device') ) { 329 new SimpleBar($('.mobile #index_tab_post_list .tab')[0]); 330 }; 331 }; 332*/ 333 334 if ($('.header_data_content').length) { 335 function header_data_scroll_bar(){ 336 var header_data_width = 0; 337 $('.header_data_content .content_item').each(function(i){ 338 header_data_width += $(this).outerWidth(true); 339 }); 340 var winW = $(window).innerWidth(); 341 if(winW < (header_data_width + 40)){ 342 $(".header_data_content").addClass('use_scroll'); 343 if(! $(body).hasClass('mobile_device') ) { 344 new SimpleBar($('.header_data_content')[0]); 345 }; 346 } else { 347 $(".header_data_content").removeClass('use_scroll'); 348 } 349 }; 350 header_data_scroll_bar(); 351 $(window).on('resize', function(){ 352 header_data_scroll_bar(); 353 }); 354 } 355 356 // drawer menu 357 $("#mobile_menu .child_menu_button").remove(); 358 $('#mobile_menu li > ul').parent().prepend("<span class='child_menu_button'><span class='icon'></span></span>"); 359 $("#mobile_menu .child_menu_button").on('click',function() { 360 if($(this).parent().hasClass("open")) { 361 $(this).parent().removeClass("open"); 362 $(this).parent().find('>ul:not(:animated)').slideUp("fast"); 363 return false; 364 } else { 365 $(this).parent().addClass("open"); 366 $(this).parent().find('>ul:not(:animated)').slideDown("fast"); 367 return false; 368 }; 369 }); 370 371 // drawer menu button 372 var menu_button = $('#menu_button'); 373 menu_button.off(); 374 menu_button.removeAttr('style'); 375 menu_button.toggleClass("active",false); 376 377 // open drawer menu 378 menu_button.on('click', function(e) { 379 380 e.preventDefault(); 381 e.stopPropagation(); 382 $('html').toggleClass('open_menu'); 383 384 // fix position for ios 385 topPosition = $window.scrollTop(); 386 $('body').css({'position':'fixed','top': - topPosition}); 387 388 $('#container, #close_menu a').one('click', function(e){ 389 if($('html').hasClass('open_menu')){ 390 $('html').removeClass('open_menu'); 391 392 // clear fix position for ios 393 $('body').css({'position':'','top': ''}); 394 $window.scrollTop(topPosition); 395 396 return false; 397 }; 398 }); 399 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.