/*!stogram2023-09-14*/ $.fn.ready(function () { $('.gotop').on('click', function () { $(window).animate(); }), $('.richtext img').height('auto'), $('.st-header .nav>li>a').hover(function () { var a = $(this).data('id'); $('.st-header .nav>li>a').removeClass('hover'), $('.st-header .pop-menu').removeClass('opened'), $(this).addClass('hover'), $('.st-header .pop-menu-' + a).addClass('opened'); }), $('.st-mainbody').hover(function () { $('.st-header .nav>li>a').removeClass('hover'), $('.st-header .pop-menu').removeClass('opened'); }); var a = 0; $(window).scrollTop() > 50 && ($('.st-header').css({ 'background-color': '#fff' }), $('.page-home .st-header').addClass('fixed')), $(window).scroll(function () { if ($(this).scrollTop() > 0) { $('.st-header').addClass('fixed'); } else { $('.st-header').removeClass('fixed'); } if ($(this).scrollTop() > 400) { $('.scroll-down-icon').css({ opacity: 0 }); } else { $('.scroll-down-icon').css({ opacity: 1 }); } // console.log(oldH, $(this).scrollTop()) if (a >= $(this).scrollTop()) { $('.st-header').css({ opacity: '1', 'pointer-events': 'all', transform: 'translateY(0%)' }); $('.page-home .st-header').css({ opacity: '1', 'pointer-events': 'all', transform: 'translateY(0%)', 'background-color': '#fff' }); } else if (a > 0) { $('.st-header').css({ opacity: '0', 'pointer-events': 'none', transform: 'translateY(-100%)' }); $('.st-header').css({ opacity: '0', 'pointer-events': 'none', transform: 'translateY(-100%)' }); $('.page-home .st-header').css({ opacity: '0', 'pointer-events': 'none', transform: 'translateY(-100%)', 'background-color': 'transparent' }); } a = $(this).scrollTop(); console.log(a); // console.log($(window).scrollTop()), // $(this).scrollTop() >= 0 ? $('.st-header').addClass('fixed') : $('.st-header').removeClass('fixed'), // $(this).scrollTop() >= 400 ? $('.scroll-down-icon').css({ opacity: 0 }) : $('.scroll-down-icon').css({ opacity: 1 }), // a <= $(this).scrollTop() // ? ($('.st-header').css({ opacity: '0', 'pointer-events': 'none', transform: 'translateY(-100%)' }), // $('.st-header').css({ opacity: '0', 'pointer-events': 'none', transform: 'translateY(-100%)' }), // $('.page-home .st-header').css({ // opacity: '0', // 'pointer-events': 'none', // transform: 'translateY(-100%)', // 'background-color': 'transparent', // })) // : ($('.st-header').css({ opacity: '1', 'pointer-events': 'all', transform: 'translateY(0%)' }), // $('.page-home .st-header').css({ opacity: '1', 'pointer-events': 'all', transform: 'translateY(0%)', 'background-color': '#fff' })), // (a = $(this).scrollTop()); }); }), $.fn.ready(function () { $('.js-form-inquire').on('submit', function () { var a = ($(this), $(this).data('id')), b = stogram.plugins[a], c = new FormData($(this)[0]); return ( b.run() && (stogram.message.loading('Submitting data...'), $.ajax({ url: '/openapi/inquire/submit', data: c, enctype: 'multipart/form-data', contentType: !1, processData: !1, method: 'POST', type: 'POST', success: function (a) { 200 == a.code ? ('en' == $('html')[0].lang ? stogram.message.info('Submitted successfully') : stogram.message.info('提亀成功'), setTimeout(function () { location.href = '?submit=ok'; }, 3e3)) : stogram.message.error(a.msg); }, })), !1 ); }); });