I have been trying to figure this out and I keep riddling myself to nowhere.
I have a blog with all the posts numbered chronologically from 1 to X (class), each page of the blog displays 10 posts, each with a numbered anchor (post1, post2, etc).
I can't figure out how to retrieve the id/class/name of the anchor of the element currently displayed on the screen (where the scrollbar is) if the user didn't get to the anchor by clicking a link.
Can this even be done? I'm trying to code it in JavaScript but I don't know where to start, a nod in the right direction would help a lot.