Alert height of window
Someone asked on Stack Overflow:
I’m trying to get the height of the window & document to display through an alert and also when a modal window pops up. I know I need to use
$(window).height();&$(document).height();but other than that I’m not sure what to do.Edit: The problem that I am trying to solve is that my modal window is adding extra pixels to the bottom of the document so I’m trying to find out the original document height and the height after the modal window is activated.
I posted the following answer, which was chosen as the accepted answer and received 6 upvotes:
Something like this
alert($(window).height());
will show an alert with the height of the window.
Notable comments
Nate (0 upvotes): @Rikudo — OP says: “I’m trying to get the height of the window & document to display through an alert” that is what I answered.
Originally posted on Stack Overflow — 6 upvotes (accepted answer). Licensed under CC BY-SA.