Before anything, let me know if i'm not being clear or if there is a better title. I'm really not good with english, so... excuse me! :)
What i'm trying to do (in part I really don't know how to search for it!) is trying to know when a user is looking at a specific page section, delimited by a anchor element.
<a id="section"></a>
Lets say I have that anchor at some point, and the user may scroll there. Is there any way to know that the user has arrived to that section? I could not find an event for that. Looks like a very trivial task. Something like document.getElementById('section').addEventListener('seen', ...)
Also, if there is any CSS selector (like :hover) to apply some styling when the anchor is met, would be great to know.
I hope i'm being clear! Any hint will be really appreciated.
EDIT: Forgot to say that my current approach will be something like detecing the colission between a fixed nav var and the anchor element, and trigger some action when this happens. EDIT: Didn't work. Position of fixed element really does not change heh...