Side Nav dropdown bar auto-open when scroll into section

Hi, I would like to create a side navbar like this:

I had created the sidebar using the dropdown. However, having no idea how to make it open when scrolling to sections. Means, only appear within the contents, not the header / footer.

May I see any tutorials/suggestions here?

Many thanks.

Hi @MeiFoo they are using AOS library for it

Thanks, @Stan for that, looks cool!
Let me make myself clear, I wish my navbar only stay sticky within the content section. Not showing in the header or the footer. I have check animation trigger in scroll but couldn’t figure out what I wanted. ;(

hi @MeiFoo they use this library also to change (add/remove) class .active on ul and li while scrolling. You can do that with vanilla JS intersection observer if you want.