/*============================================== #へ移動 ==============================================*/ 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); } }); /*============================================== トップへ戻る ==============================================*/ jQuery(function() { var topBtn = jQuery('.page-top'); topBtn.hide(); //スクロールが200に達したらボタン表示 jQuery(window).scroll(function () { if (jQuery(this).scrollTop() > 200) { topBtn.fadeIn(); } else { topBtn.fadeOut(); } }); }); /*============================================== スライドショー ==============================================*/ jQuery(function() { jQuery('.slider').slick({ prevArrow: '', nextArrow: '', infinite: true, dots: false, slidesToShow: 1, centerMode: true, //要素を中央寄せ centerPadding:'0', //両サイドの見えている部分のサイズ autoplay:true, //自動再生 responsive: [{ breakpoint: 480, settings: { centerMode: true, } }] }); }); jQuery(function() { jQuery('.sp_slider').slick({ prevArrow: '', nextArrow: '', infinite: true, dots: false, slidesToShow: 1, centerMode: true, //要素を中央寄せ centerPadding:'10%', //両サイドの見えている部分のサイズ autoplay:true, //自動再生 responsive: [{ breakpoint: 480, settings: { centerMode: true, } }] }); }); /*============================================== popup ==============================================*/ $(function () { $('.popup-modal').magnificPopup({ type: 'inline', preloader: false, fixedContentPos: true, }); //閉じるリンクの設定 $(document).on('click', '.popup-modal-dismiss', function (e) { e.preventDefault(); $.magnificPopup.close(); }); });