Reputation: 4202
I'm writing a script that creates a popup that dims the screen behind the popup. I'm using JQuery's $("#dim").css("height", $(document).height());
to resize the div
element in question, but it doesn't cover the master page area. Is there a way I can get the height of the WHOLE page and not just the child page?
EDIT: The problem may actually lie in the positioning, and not the size, of my div. I have it set to top:0
, but maybe I need to move it using javascript?
Upvotes: 2
Views: 849
Reputation: 92923
Since .outerHeight()
isn't supported for window
or document
, you'll have to add the padding to the height()
yourself.
$("#dim").css( "height", $(document).height() + 2*parseInt($(document).css("padding"),10) );
Upvotes: 2
Reputation: 46057
Give this a shot:
var width = screen.availWidth;
var height = screen.availHeight;
Upvotes: 3