Last active
March 11, 2017 15:14
-
-
Save webolizzer/87e8f30acaded0aedf10201e80820dba to your computer and use it in GitHub Desktop.
Get the size of the screen, current web page and browser window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @author http://stackoverflow.com/a/3437825/2337281 | |
$(window).height(); // returns height of browser viewport | |
$(document).height(); // returns height of HTML document (same as pageHeight in screenshot) | |
$(window).width(); // returns width of browser viewport | |
$(document).width(); // returns width of HTML document (same as pageWidth in screenshot) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment