Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion _assets/js/api-toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ $(function () {
e.preventDefault();
animateScrolling(this.hash);
};


// Detect hash on page load and readjust scroll offset
var initialHash = window.location.hash;
if (!!initialHash) {
setTimeout(function(){
animateScrolling(initialHash);
}, 100);
}

$("#markdown-toc")
.on("click", "a", function () {
$(".section > ul").hide();
Expand Down
10 changes: 9 additions & 1 deletion _assets/js/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,15 @@ $(function() {
e.preventDefault();
animateScrolling(this.hash);
};


// Detect hash on page load and readjust scroll offset
var initialHash = window.location.hash;
if (!!initialHash) {
setTimeout(function(){
animateScrolling(initialHash);
}, 100);
}

// animated scroll
// Exclude the app inside the div.theme-preview since it's not in an <iframe/>,
// leading to unwanted scrollTop when clicking on links inside the app.
Expand Down