Domanda

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 ?

È stato utile?

Soluzione

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().

Altri suggerimenti

I am using: document.body.scrollHeight

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top