Discover and print the browser window width using JQuery - Javascript jQuery

Javascript examples for jQuery:Width Height

Description

Discover and print the browser window width using JQuery

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from www .  ja  va2 s  . c  o m
$(document).ready(function () {
    var windowWidth = $(window).width();
    console.log(windowWidth);
});
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials