How to find out the height of the whole page (along with scrolling) from the beginning of the header to the end of the footer ?
|
2 answers
Simple js:
var B = document.body, H = document.documentElement, height if (typeof document.height !== 'undefined') { height = document.height // For webkit browsers } else { height = Math.max( B.scrollHeight, B.offsetHeight,H.clientHeight, H.scrollHeight, H.offsetHeight ); } jquery: $(document).height()
|
If you mean the height of the content between the tags <header> and <footer> :
document.querySelector('.content').clientHeight; - between but taking into account viso and tovo and tovo - vov4ok
- So you need the answer Konstantin Okhotnick. - YozhEzhi
|