|
|
|
|
@ -42,7 +42,7 @@
|
|
|
|
|
})(window, document, 'script', 'dataLayer', 'GTM-T75N4LL');</script>
|
|
|
|
|
<!-- End Google Tag Manager -->
|
|
|
|
|
|
|
|
|
|
<!-- Hotjar Tracking Code for https://www.chinahighlights.com/
|
|
|
|
|
<!-- Hotjar Tracking Code for https://www.chinahighlights.com/
|
|
|
|
|
<script>
|
|
|
|
|
(function(h,o,t,j,a,r){
|
|
|
|
|
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
|
|
|
|
|
@ -93,7 +93,7 @@
|
|
|
|
|
id="china_yangtze_cruise_2021">Yangtze River Cruise</a></li>
|
|
|
|
|
<li class="start-nav-item"><a href="/tour/expats-tours.htm"
|
|
|
|
|
id="china_expats_tours_2021">China Expats Tours</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
@ -602,20 +602,32 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
(function (w, d, i) {
|
|
|
|
|
var navbar = d.getElementById(i);
|
|
|
|
|
var prevScrollpos = w.pageYOffset;
|
|
|
|
|
w.onscroll = function () {
|
|
|
|
|
var currentScrollPos = w.pageYOffset;
|
|
|
|
|
if (prevScrollpos > currentScrollPos) {
|
|
|
|
|
navbar.style.top = '0';
|
|
|
|
|
} else {
|
|
|
|
|
navbar.style.top = '-100px';
|
|
|
|
|
}
|
|
|
|
|
prevScrollpos = currentScrollPos;
|
|
|
|
|
}
|
|
|
|
|
})(window, document, 'header');
|
|
|
|
|
</script>
|
|
|
|
|
(function (w, d, i) {
|
|
|
|
|
function debounce(func, wait) {
|
|
|
|
|
let timeout;
|
|
|
|
|
return function() {
|
|
|
|
|
const context = this;
|
|
|
|
|
const args = arguments;
|
|
|
|
|
clearTimeout(timeout);
|
|
|
|
|
timeout = setTimeout(() => func.apply(context, args), wait);
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var navbar = d.getElementById(i);
|
|
|
|
|
var prevScrollpos = w.pageYOffset;
|
|
|
|
|
w.onscroll = debounce(function () {
|
|
|
|
|
var currentScrollPos = w.pageYOffset;
|
|
|
|
|
if (Math.abs(currentScrollPos - prevScrollpos) > 5) { // 滚动阈值
|
|
|
|
|
if (prevScrollpos > currentScrollPos) {
|
|
|
|
|
navbar.style.top = '0';
|
|
|
|
|
} else {
|
|
|
|
|
navbar.style.top = '-100px';
|
|
|
|
|
}
|
|
|
|
|
prevScrollpos = currentScrollPos;
|
|
|
|
|
}
|
|
|
|
|
}, 25) // 防止快速滚动时频繁触发
|
|
|
|
|
})(window, document, 'header');
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<!--@PRODUCT-JS@-->
|
|
|
|
|
<!--@ADDON-JS@-->
|
|
|
|
|
|