// JavaScript Document $(function() {   $('a[href^="#"],a[href*="#"]').not('.gtr').on('click',function() { var mrg = $("#head").outerHeight() + 10; href = $(this).attr("href"); var hrefs=href.substring(href.indexOf("#")+1,href.length); href = "#"+hrefs;     var target = $(href == "#" || href == "" ? 'html' : href); var position = target.offset().top - mrg;     $('body,html').animate({scrollTop:position}, 500, 'swing'); return false; }); setsize(); if($('input.zip').length){ $('input.zip:first-child').attr('id','zip'); $('input.zip:nth-child(2)').attr('id','zip1'); } $('.sp.togglemenu > span').on('click',function(){ $(this).toggleClass('open'); $(this).next('div').slideToggle(300); }); $('.sp.menuopen').on('click',function(){ $(this).toggleClass('open'); $(this).next('div').slideToggle(300); }); var delay = 100; setTimeout(function(){ $('.online-accd .elementor-tab-title').removeClass('elementor-active'); $('.online-accd .elementor-tab-content').css('display', 'none'); }, delay); $('input.program[value="JSAF Remote+(オンラインプログラム)"]').on('change',function(){ var r = $(this).prop('checked'); if(r){ $('input.plan-cource').addClass('color'); }else{ $('input.plan-cource').removeClass('color'); } }); if($('.mw_wp_form.mw_wp_form_input table tr:last-child td .business-description').length){ let att = $('.mw_wp_form.mw_wp_form_input table tr:last-child td .business-description span'); $('.mw_wp_form.mw_wp_form_input table tr:last-child td .business-description').remove(); $('.mw_wp_form.mw_wp_form_input table tr:last-child td .mwform-checkbox-field-text').html(att); } }); $(window).on('load',function(){ setsize(); movepos(); }); $(window).on('resize',function () { setsize(); //movepos(); }); $(window).on('scroll',function () { //setsize(); }); $(window).on('orientationchange', function(){ setsize(); }); function setsize(){ var hsize = $("#head").outerHeight(); $("#container").css("padding-top",hsize+"px"); if($(window).width() > 640){ $('.sp.togglemenu > span').removeClass('open'); $('.sp.togglemenu > span + div').removeAttr('style'); $('.sp.menuopen').removeClass('open'); $('.sp.menuopen + div').removeAttr('style'); } } //他ページよりのアンカーリンク function movepos(){ /* var mrg = $("#head").outerHeight() + 10; var href = location.href; if(href.indexOf("#")>=0 || location.search){ var hrefs=href.substring(href.indexOf("#")+1,href.length); href = hrefs; //alert(href); var position = $("#"+href).offset().top; var speed = 500; $('body,html').animate({scrollTop:position-mrg}, speed, 'swing'); }else{ return false; } var hashString = location.hash.substr(1); history.replaceState('', document.title, window.location.pathname); */ }