Pergunta

This question isn't here and this is not duplicate.

I need real page (full) height, not only visible part, but scrolled part included. I try:

$('body/html').height(), window.height, window.outerHeight 

and others, but they give me only the visible height of the page. I want all height.

I work with:

html, body { height: 100%;}, 

With many contents and scroll in the page and page with long content. How can I get full height of the page ?

Foi útil?

Solução

With jQuery $('html').outerHeight() is what you want. The window height is only the height of the viewport. The only way the above wouldn't work is if your html is constrained to the height of the window and you have some other wrapping div with an overflow, in which case you'd want to get its outerHeight().

Outras dicas

I am using: document.body.scrollHeight

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top