mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Optimise auto-scroll for docs by hash
This commit is contained in:
7
docs/_templates/footer.html
vendored
7
docs/_templates/footer.html
vendored
@ -34,10 +34,11 @@
|
||||
if ($('#pionav').css('display') !== 'block') {
|
||||
return;
|
||||
}
|
||||
window.setTimeout('$(window).scrollTop($(window).scrollTop() - 50);', 50);
|
||||
$(window).on('hashchange', function(e){
|
||||
function fixScroll() {
|
||||
$(window).scrollTop($(window).scrollTop() - 50);
|
||||
});
|
||||
}
|
||||
window.setTimeout(fixScroll, 50);
|
||||
$(window).on('hashchange', function(e){fixScroll();});
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user