DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

John has posted 18 posts at DZone. View Full User Profile

Determine Screen Height

  • submit to reddit
        // description of your code here


var h = document.documentElement.scrollHeight;

..however in some cases (safari 3) you may have to find where something is on the screen and generate the actual screen size around that
if (($('lightbox_bottom').cumulativeOffset().top+30) > document.documentElement.scrollHeight) {
else {

30 being the height of the bottom element your using to judge.