I'd like to track the state (scroll position) of a scrollable div.
I currently have a webapp that contains a fixed header and footer where the content area (a div) is scrollable.
My initial implementation tracks the scrollTop for the class on that div with pushState (window.history.state).
However, I'm curious as to whether there's a better way:
Making the browser use
pushStateto track a specific area, like mydivinstead of the bodyCan the browser's
pushStatetrack the state in multiple areas, like the body and the scroll positions/states in multiple scrollable divs/content areas?
Aucun commentaire:
Enregistrer un commentaire