Posted By

madr on 12/09/10


Tagged

javascript textmate crossbrowser


Versions (?)

Cross Browser Document Height


 / Published in: Other
 

  1. // found at http://james.padolsey.com/javascript/get-document-height-cross-browser/
  2. function getDocHeight() {
  3. var D = document;
  4. return Math.max(
  5. Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
  6. Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
  7. Math.max(D.body.clientHeight, D.documentElement.clientHeight)
  8. );
  9. }

Report this snippet  

You need to login to post a comment.