rstacruz / flatdoc

Build sites fast from Markdown
http://ricostacruz.com/flatdoc
2.68k stars 263 forks source link

Flatdocs menu highlights wrong section #97

Open mothra42 opened 6 years ago

mothra42 commented 6 years ago

On our side bar menu the active class is added to the wrong section. It seems like the current id and previous id that the script is looking at is off. Any help is appreciated.

mattrmay commented 6 years ago

Likely to due with static values used in your calculation in script.js. I'll see if I can find another way to solve this when I get home from work!

https://github.com/rstacruz/flatdoc/blob/d07df9dbf475f5f289dc59528eee8fd068a50840/theme-white/script.js#L132