0
在我的网站上,我做了粘头。ScrollTop bug jquery在chrome
它非常好每个浏览器,但是当我在MacBook上测试Chrome上有与scrollTop
我有我的主标题和粘性头的错误:
我这个代码:
$(document).on('scroll',function() {
if ($(document).scrollTop() >= 150) {
$('header:not(.sticky)').hide();
$('header.sticky').show();
} else {
$('header:not(.sticky)').show();
$('header.sticky').hide();
}
});
当我滚动到150px时,它跳到我的页面顶部。
感谢您的帮助!