jQuery(function() { jQuery("a[href^=#]").click(function(){ var elmID = jQuery(this).attr("href"); var posi = 0; if(jQuery(elmID).size()){ posi = jQuery(elmID).offset().top -0; BodySlider(posi); return false; } }); function BodySlider(HashOffset){ jQuery("html,body").animate({ scrollTop: HashOffset }, 600); } }); /*============================================== スライドショー ==============================================*/ $(function() { $('.slider').slick({ prevArrow: '', nextArrow: '', infinite: true, dots: false, slidesToShow: 1, centerMode: true, //要素を中央寄せ centerPadding:'10%', //両サイドの見えている部分のサイズ autoplay:true, //自動再生 responsive: [{ breakpoint: 480, settings: { centerMode: true, } }] }); }); $(function(){ $('#contents2 .inner').matchHeight(); $('#contents2 .inner .ttl01').matchHeight(); $('#contents2 .inner .main-text').matchHeight(); $('.STF_WEBNAME').matchHeight(); }); /*============================================== ヘッダー位置ずれ防止 ==============================================*/ $(function () { var headerHight = 70; //ヘッダの高さ $('a[href^=#]').click(function(){ var href= $(this).attr("href"); var target = $(href == "#" || href == "" ? 'html' : href); var position = target.offset().top-headerHight; //ヘッダの高さ分位置をずらす $("html, body").animate({scrollTop:position}, 550, "swing"); return false; }); });