Open justlevine opened 5 years ago
I use a nextUntil function to search for the subsections that only looks at elems on the same level. I did this to try and speed up the dom query but I'll have to rethink it. Thanks for opening the bug.
I did come across the same issue. I "solved" this behaviour, repeating the headings on the expected level and hide the duplicates using visibility:hidden (display:none shows heading in nav, but does not scroll to correct position). Works for me.
For some reason, only subsections in the same parent element are recognised by scrollnav. This is obviously not ideal behavior, as there are various reasons one might be nesting their subsections in a different element (e.g. lists).
Config:
Html
Suggestions on how to fix?