Skip to content

Commit

Permalink
readme fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
eabrega committed Nov 15, 2020
1 parent 2260fc0 commit 3152880
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ document.addEventListener("DOMContentLoaded", function (event) {
.forEach(element =>
element.classList.remove('active-meny-item')
);
document.querySelector(`[href="#${id}"]`)
.classList.add('active-meny-item');
document.querySelector(`[href="#${id}"]`).classList
.add('active-meny-item');
}
);
});
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,22 @@ document.addEventListener("DOMContentLoaded", function (event) {
let currentParagraphName = document.getElementById('current-paragraph-name');
let currentParagraphPercent = document.getElementById('current-paragraph-percent');

var options = {
CursorSelector: "#cursor",
MenuSelector: "menu", // require
OnScrolled: progress=>{
new ScrollProgress.Init(
"#cursor",
"menu",
progress => {
currentParagraphName.innerText = document.getElementById(progress.Id).innerText;
currentParagraphPercent.innerText = progress.Percent + '%';
},
OnChanged: id=>{
id => {
document.querySelectorAll('a[href*="link"]')
.forEach(element => element.classList.remove('active-meny-item'));
document.querySelector(`[href="#${id}"]`).classList.add('active-meny-item');
},
};

new ScrollProgress.Init(options);
.forEach(element =>
element.classList.remove('active-meny-item')
);
document.querySelector(`[href="#${id}"]`).classList
.add('active-meny-item');
}
);
});
```

Expand Down

0 comments on commit 3152880

Please sign in to comment.