提交 e4c5cdba 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!155 Fix the issue "Not precise location in the docs".

Merge pull request !155 from ZhengyuhangHans/fixDocsPage20200505
......@@ -143,5 +143,17 @@
showNav();
}
});
$(' a[href^="#"][href!="#"]').click(function () {
var target = document.getElementById(decodeURI(this.hash).split('#')[1]);
if (!target) {
return;
}
var targetOffset = $(target).offset().top - 140 + 'px';
$('html,body').animate({
scrollTop: targetOffset
},
300);
return false;
});
});
</script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册