Tuesday, June 4, 2024
 Popular · Latest · Hot · Upcoming
171
rated 0 times [  176] [ 5]  / answers: 1 / hits: 5658  / 11 Years ago, tue, december 10, 2013, 12:00:00

I'm trying since 2 hours to find the entire document with AngularJS.



I found a lot of question about the height of the body, but nothing for the entire document.



With jQuery, I use $(document).height and the game is played but with angularjs I can have $window.height but if I'm trying $document.height, the function return undefined.



I use AngularJS 1.2.4


More From » angularjs

 Answers
11

From http://james.padolsey.com/javascript/get-document-height-cross-browser/



function getDocHeight() {
return Math.max(
document.body.scrollHeight, document.documentElement.scrollHeight,
document.body.offsetHeight, document.documentElement.offsetHeight,
document.body.clientHeight, document.documentElement.clientHeight
);
}

[#49664] Monday, December 9, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kaylinshayd

Total Points: 443
Total Questions: 104
Total Answers: 111

Location: Nauru
Member since Wed, Mar 29, 2023
1 Year ago
;