Hello, i have menu in header and list in content. To imagine better see below
MENU
menu-item-1 | menu-item-2 | menu-item-3
and nested list in content
menu-item-1
list-item-1
list-item-2
list-item-3
menu-item-2
list-item-4
list-item-5
list-item-6
menu-item-3
list-item-7
list-item-8
list-item-9
So, i have a scrollTo function, when i click for example menu-item-3 it scrolls to menu-item-3 in list and i store menu-item-3 in variable. That works great, but now i also need to store this menu item even when user scrolls without clicking to menu item, i mean i need to get current scrolled element. Can anyone help me?
Sorry for my bad English and i hope you understand my question and help me to achive this.