Reputation: 1024
I have the code to show the width and height for the viewport, but not the actual window size.
Any idea how I can get the window size?
Upvotes: 5
Views: 122
Reputation: 324610
No, you cannot get the size of the browser panels.
The closest you can get is if the user has maximized the window, you can take the screen size and subtract the window size, and it will leave you with the size of the toolbars.
Upvotes: 1
Reputation: 79830
I am not sure, but I think what you want the document width
and height
Try using $(document).height()
and $(document).width()
to get the page width and height.
DEMO: http://jsfiddle.net/JvGZr/2/
Upvotes: 0