mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 20:46:15 -04:00
json: Make URL #fragment jump to the right spot after loading (#233)
This commit is contained in:
parent
e03cbec7c4
commit
64d67e510e
1 changed files with 7 additions and 1 deletions
|
@ -22,6 +22,12 @@ $.get("/api/docs/config"+configPath, function(json) {
|
|||
$('<span> › <a href="'+jsonDocsPathPrefix+bcPath.substr(1)+'/" class="breadcrumb has-popup" data-sibling-path="'+bcSiblingPath+'">'+pathComponents[i]+'</a></span>').appendTo($bc);
|
||||
}
|
||||
|
||||
// re-trigger the URL fragment if any, to scroll to the archor
|
||||
var fragment = window.location.hash;
|
||||
if (fragment) {
|
||||
window.location.hash = '';
|
||||
window.location.hash = fragment;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue