You can get the size of the window or document with jQuery
:
1 2 3 4 5 6 7 | // Size of browser viewport. $(window).height(); $(window).width(); // Size of HTML document (same as pageHeight/pageWidth in screenshot). $(document).height(); $(document).width(); |
For screen size you can use the screen object:
1 2 | window.screen.height; window.screen.width; |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.