diff --git a/scribbler.js b/scribbler.js index 3673ade..ce9c32b 100755 --- a/scribbler.js +++ b/scribbler.js @@ -81,7 +81,8 @@ function setActiveLink(event) { event.target.classList.add('selected'); } -function smoothScrollTo(element, event) { +function smoothScrollTo(i, event) { + var element = sections[i]; setActiveLink(event); window.scrollTo({ @@ -92,26 +93,9 @@ function smoothScrollTo(element, event) { } if (btns.length && sections.length > 0) { -// for (var i = 0; i