$(function(){ AOS.init({ duration: 500, easing: 'ease-in-sine', }); // $("#js-top_bg").ripples({ // resolution: 3000, //波紋が広がる速さ // dropRadius: 20, //波紋の大きさ // perturbance: 1 //波紋の揺れの量 // }); //ヘッダー固定のCSS $(window).on("scroll load", function(){ const wt = $(window).scrollTop(); if (wt > 100) { $(".header_nav").addClass("fixed"); } else { $(".header_nav").removeClass("fixed"); } }); //ページ内リンクスクロール $('a[href^="#"]').on("click", function() { const speed = 400; //スクロールのスピードを調整できます const href= $(this).attr("href"); const target = $(href == "#" || href == "" ? 'html' : href); const position = target.offset().top; $('body,html').animate({scrollTop:position}, speed, 'swing'); return false; }); //トップへ戻る $("#js-top_scroll").on("click", function () { const speed = 600; //スクロールのスピードを調整できます $('body,html').animate( { scrollTop: 0 }, speed, 'swing' ); }); //グローバルナビ開閉 const navButton = $('#js-navButton'); const sp_gnav = $("#js-sp_gnav"); navButton.on('click', function() { sp_gnav.toggleClass('show'); if ($(this).attr('aria-expanded') == 'false') { $(this).attr('aria-expanded', true); } else { $(this).attr('aria-expanded', false); } }); sp_gnav.find('.gNav_item').on('click', function() { sp_gnav.removeClass('show'); navButton.attr('aria-expanded', false); }); sp_gnav.find("._accordion").on("click", function () { $(this).toggleClass("_show"); }); //フッターナビ開閉 const sp_fnav = $("#js-sp_fnav"); sp_fnav.find(".footer_item h3").on("click", function () { if (!$(this).parent().hasClass("_link")) { $(this).parent().toggleClass("_show"); } }); //トップ Information スライド const width = $(window).width(); const slick_parent = $(".info_slick"); slick_parent.slick({ slidesToShow: 4, slidesToScroll: 4, speed: 400, cssEase: "ease-out", infinite: false, responsive: [ { breakpoint: 768, settings: { slidesToShow: 2, slidesToScroll: 2, speed: 400, cssEase: "ease-out", arrows: false, } } ] }); //トップ 動画のモーダル $('#js-movie-modal').modaal({ type: 'video' }); //トップ スクロールアニメーション $(window).on("scroll load resize", function () { $(".anime_left, .anime_fade").each(function () { const position = $(this).offset().top; const scroll = $(window).scrollTop(); const windowHeight = window.innerHeight; const view_flag = position - windowHeight + 150; console.log("scroll:"+scroll+" view_flag:"+view_flag); if (scroll > view_flag){ $(this).addClass('view'); } }); }); $(".anime_fade").each(function () { $(this).addClass("anime_fade_js"); }); //リクルート スクロールアニメーション if ($("body").hasClass("recruit")) { $(window).on("scroll load", function () { const scroll_recruit = $(window).scrollTop(); const windowHeight = window.innerHeight; if (scroll_recruit > 300){ $(".recruit_cv").addClass('view'); } else { $(".recruit_cv").removeClass('view'); } const position_recruit = $(".footer_contact").offset().top; if (scroll_recruit > 300 && scroll_recruit > (position_recruit - windowHeight) ){ $(".recruit_cv").removeClass('view'); } }); } //FAQ クリックアクション $(".faq_nav li").on("click", function () { if (!$(this).hasClass("active")) { $(".faq_nav li").removeClass("active"); $(this).addClass("active"); $(".faq_group").toggleClass("active"); $('body, html').animate({ scrollTop: 300 }, 500); return false; } }); $(".faq_q").on("click", function () { $(this).parent().toggleClass("active"); }); //Information タブクリックアクション $(".information_nav li").on("click", function () { const click_class = $(this).attr("data-sort"); $("#js-sort").removeClass(); $("#js-sort").addClass(click_class).addClass("information_link"); }); //トップアニメーション // const content_length = 80; // const content = $("#js-anime_content"); // content.append('
'); // for (let i=0; i' // +'
' // +'
' // +'
' // +'' // +'' // +'
' // +'
' // +'
' // +'' // ); // } // $(".anime_inner").append( // '
' // +'
' // +'
' // +'
' // +'' // +'' // +'
' // +'
' // +'
' // +'
' // ); //Header Menu フェードイン・フェードアウト $('.header_nav_pc > ul > li > a, .header_nav_pc > ul > li > p').on({ "mouseenter": function() { $(this).parent().addClass('selected'); }, "mouseleave": function() { $('.header_nav_pc > ul > li > .nav-outer').on({ "mouseenter": function() { $(this).parent().addClass('selected'); }, "mouseleave": function() { $(this).parent().removeClass('selected'); } }); $(this).parent().removeClass('selected'); } }); });