$(function () { // AOS.init(); $("body").on("click", ".go-top", function (e) { e.preventDefault(); $("html,body").animate( { scrollTop: 0, }, 600 ); }); if (!localStorage.getItem('cookie')) { // $('.cookie').show(); } // $(window).on('scroll', function () { // scrollFixedBox(); // }); // scrollFixedBox(); }); function scrollFixedBox() { const pagePercentage = ($(window).scrollTop() + $(window).height()) / $('body').height(); if (pagePercentage < 0.97) { $('.fixed-box').show(); } else { $('.fixed-box').hide(); } } function GA(action, category, label) { gtag('event', action, { 'event_category': category, 'event_label': label, 'value': 1 }); } function agreeCookie() { localStorage.setItem('cookie', '1'); $('.cookie').hide(); }