javascript - How to I calculate the height of visible? -


this question has answer here:

i have html page following model,

when user scrolling page, how calculate height of visible part of #page1?

-------------------------------------------------------  #heder (position: fixed; height: 100px, z-index: 10) -------------------------------------------------------                       visible zone   ____________________________________________________  |                                                  |  |                  #page1 (visible)                |  |                                                  |  |  (position: static; height: 1000px, z-index: 0)  |  |                                                  | -------------------------------------------------------  #footer (position: fixed; height: 50px, z-index: 10) -------------------------------------------------------  |                                                  |  |                                                  |  |                                                  |  |                                                  |  |                  #page1 (invisible)              |  |                                                  |  |                                                  |  |                                                  |  |                                                  |  ____________________________________________________  |                                                  |  |                                                  |  |                                                  |  |                  #page2 (invisible)              |  |                                                  |  |  (position: static; height: 700px, z-index: 0)   |  |                                                  |  |                                                  |  |                                                  |  |                                                  |  |                                                  |  ____________________________________________________ 

you can height of outermost window using window.top in jquery. height of window.top height of browser window or iframe inside it.

$(window.top).height(); 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -