SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Do you know a way to find out a scroll position in JS or jQuery on a page in Sharepoint 2010? I have a web part that is very big (high) so scroll on the page appears. But I cannot determine the scroll position in any known way using javascript - it is always 0


all return 0. I cannot get through this. I think sharepoint is to blame. Is there any way to find out?

share|improve this question

By default SharePoint page divided on two areas: static header (where are ribbon row and top bar) and workspace. Header is always on top and you scrolling in workspace area only, but not in whole page. So you need to know scroll possition in worspace area. You can make it with this javascript code:

share|improve this answer
This should work--as IAdanasov points out, the default behavior of SP2010 is that the body doesn't scroll. You can certainly disable this if you've done customizations to your branding, but out of the box, you want the scroll position of the 's4-workspace' div. – webdes03 Feb 29 '12 at 15:25

Try one of these, I believe they might help you:

  1. how-do-i-determine-height-and-scrolling-position-of-window-in-jquery
  2. get-current-scroll-position-and-pass-it-as-a-variable-with-a-link
share|improve this answer
tried them to no avail; it's the same thing i suppose – agnieszka Jan 17 '12 at 14:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.