We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e4bb53b + f26ed04 commit 84eb328Copy full SHA for 84eb328
1 file changed
assets/js/main.js
@@ -88,7 +88,7 @@
88
var node = nodes.filter(function(n) { return n.getAttribute('id') === e.target.getAttribute('href').substr(1); })[0];
89
if (node) {
90
node.classList.add('active');
91
- window.scrollTo({ top: node.offsetTop });
+ node.scrollIntoView({behavior: "smooth"});
92
var answer = document.createElement('p');
93
answer.classList.add('tree-node-answer');
94
answer.innerText = e.target.innerText;
0 commit comments