Kenneth B Kenneth B - 2 months ago 20
Javascript Question

Visible window height instead of $(window).height();

Is there any way to get the visible height of the whole page from inside an

iframe
,
$(window).height()
gives me the
iframe
s height?

Answer

If you are using frames, you can get the height of the outermost window by using window.top in the jQuery constructor. The height of window.top will get the height of the browser window.

$(window.top).height();

Edit: Updated window.top reference as Mozilla moved their documentation around.