提交 9820ab35 编写于 作者: A Alexey Milovidov

Fix not working links on single-page docs

上级 fba8d66f
...@@ -16,23 +16,6 @@ ...@@ -16,23 +16,6 @@
if (target_id && target_id.startsWith('logo-')) { if (target_id && target_id.startsWith('logo-')) {
selector = '#'; selector = '#';
} }
if (selector && selector.startsWith('#') && !is_tab && !is_collapse && !is_rating) {
event.preventDefault();
var dst = window.location.href.replace(window.location.hash, '');
var offset = 0;
if (selector !== '#') {
var destination = $(selector);
if (destination.length) {
offset = destination.offset().top - $('#top-nav').height() * 1.5;
dst += selector;
}
}
$('html, body').animate({
scrollTop: offset
}, 500);
window.history.replaceState('', document.title, dst);
}
}); });
var top_nav = $('#top-nav.sticky-top'); var top_nav = $('#top-nav.sticky-top');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册