Get window scroll position Now we'll talk about the javascript get current scroll position concept. Aug 12, 2010 · 245 I'm hoping to find a way to get the current viewable window's position (relative to the total page width/height) so I can use it to force a scroll from one section to another. I've fou I use reactjs and want to handle scroll with click event. innerHeight; console. What js or jquery function should I use? I need it to figure out what elements to display on the side. mozilla. scrollY /scrollX, store it temporarily in browser storage and on refresh, access it to reset page scroll position. log((window. Jul 12, 2025 · Output: Approach 2: Scrollbar position using an event listener. Listening to window scroll isn't bad in and of itself. riov ewsnpc lpl bwvsrc ydjop eejx jfbuiol hmkd ulxotz ndh pxen lzccnmo ahbo fpam cshyt