mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
[docs] handle incorrect hash in url (#10999)
* [docs] handle incorrect hash in url * fix mistype
This commit is contained in:
parent
0fe723acc9
commit
528ac30a01
@ -20,9 +20,12 @@
|
||||
var offset = 0;
|
||||
|
||||
if (selector !== '#') {
|
||||
offset = $(selector).offset().top - $('#top-nav').height() * 1.5;
|
||||
var destination = $(selector);
|
||||
if (destination.length) {
|
||||
offset = destination.offset().top - $('#top-nav').height() * 1.5;
|
||||
dst += selector;
|
||||
}
|
||||
}
|
||||
$('html, body').animate({
|
||||
scrollTop: offset
|
||||
}, 500);
|
||||
@ -32,11 +35,14 @@
|
||||
|
||||
var top_nav = $('#top-nav.sticky-top');
|
||||
if (window.location.hash.length > 1 && top_nav.length) {
|
||||
var offset = $(window.location.hash).offset().top - top_nav.height() * 1.5;
|
||||
var hash_destination = $(window.location.hash);
|
||||
if (hash_destination.length) {
|
||||
var offset = hash_destination.offset().top - top_nav.height() * 1.5;
|
||||
$('html, body').animate({
|
||||
scrollTop: offset
|
||||
}, 70);
|
||||
}
|
||||
}
|
||||
|
||||
$('img').each(function() {
|
||||
var src = $(this).attr('data-src');
|
||||
|
Loading…
Reference in New Issue
Block a user