Javascript examples for jQuery:Width Height
Difference between $(window).width() vs $(document).width()
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> <style id="compiled-css" type="text/css"> html { width: 1000px; } </style> <script type="text/javascript"> $(window).load(function(){//from ww w .j av a2 s . c om console.log($(window).width()); console.log($(document).width()); }); </script> </head> <body> </body> </html>