How to make a div float in and scroll with the center of page?

Posted by Murvinlai on Stack Overflow See other posts from Stack Overflow or by Murvinlai
Published on 2010-04-28T22:53:55Z Indexed on 2010/04/28 22:57 UTC
Read the original article Hit count: 184

Filed under:
|
|
|

So, I work on a Facebook FBML App. What I want is simple. Just have a div shows in the center of the page, and scroll with the page. i.e. always in the center.

It would be easy with normal JS. I just use the pageYOffset

However, in Facebook using FBJS, I am not sure what I should use. It doesn't have getPageYOffset().. and I tried getScrollTop().. it doesn't seem the right thing.

So, anyone knows how?

© Stack Overflow or respective owner

Related posts about facebook

Related posts about div